├── static ├── images │ ├── line.jpg │ ├── nav.png │ ├── plus.png │ ├── por.png │ ├── wrok.png │ ├── aimg1.jpg │ ├── connect.png │ ├── image1.jpg │ ├── image10.jpg │ ├── image11.jpg │ ├── image12.jpg │ ├── image2.jpg │ ├── image3.jpg │ ├── image4.jpg │ ├── image5.jpg │ ├── image6.jpg │ ├── image7.jpg │ ├── image8.jpg │ ├── image9.jpg │ ├── popup.jpg │ ├── slider1.jpg │ ├── slider2.jpg │ ├── slider3.jpg │ ├── slider4.jpg │ ├── slider6.jpg │ ├── them1.jpg │ ├── them1.png │ ├── them2.jpg │ ├── them3.jpg │ ├── them4.jpg │ ├── them6.jpg │ ├── jusesimg.jpg │ ├── soc_media.png │ ├── spriteimg.png │ └── slidertextbg1.png ├── fonts │ ├── BEBAS___-webfont.eot │ ├── BEBAS___-webfont.ttf │ ├── BEBAS___-webfont.woff │ ├── OpenSans-Regular-webfont.eot │ ├── OpenSans-Regular-webfont.ttf │ └── OpenSans-Regular-webfont.woff ├── js │ ├── responsive-nav.js │ ├── jquery.easing.min.js │ ├── jquery.easing.1.3.js │ ├── jquery.mixitup.min.js │ ├── fliplightbox.min.js │ └── jquery.mobile.customized.min.js ├── css │ └── JFAlert.css ├── contact.html ├── portofolioitem.html ├── about.html ├── blog.html ├── portfolio.html └── index.html ├── .gitattributes ├── README.md ├── src ├── main │ └── java │ │ └── alpaca │ │ ├── paser │ │ └── TypeParser.java │ │ ├── Startup.java │ │ ├── http │ │ ├── session │ │ │ ├── HttpSession.java │ │ │ └── HttpSessionManager.java │ │ ├── servlet │ │ │ ├── HttpServlet.java │ │ │ ├── HttpServletRequest.java │ │ │ └── HttpServletResponse.java │ │ ├── template │ │ │ └── StaticServlet.java │ │ ├── handler │ │ │ └── NettyHandler.java │ │ └── HttpServer.java │ │ ├── conf │ │ └── WebProperties.java │ │ ├── beans │ │ ├── BeanWrapper.java │ │ └── AlpacaBeanInfo.java │ │ └── Alpaca.java └── test │ └── java │ └── alpaca │ ├── beans │ └── AlpacaBeanInfoTest.java │ └── AlpacaTest.java ├── .idea ├── vcs.xml ├── modules.xml ├── libraries │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__io_netty_netty_all_4_1_2_Final.xml │ └── Arquillian_JUnit_Release.xml ├── misc.xml └── compiler.xml ├── dependency-reduced-pom.xml ├── AlpacaWebServer.iml └── pom.xml /static/images/line.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/line.jpg -------------------------------------------------------------------------------- /static/images/nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/nav.png -------------------------------------------------------------------------------- /static/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/plus.png -------------------------------------------------------------------------------- /static/images/por.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/por.png -------------------------------------------------------------------------------- /static/images/wrok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/wrok.png -------------------------------------------------------------------------------- /static/images/aimg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/aimg1.jpg -------------------------------------------------------------------------------- /static/images/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/connect.png -------------------------------------------------------------------------------- /static/images/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image1.jpg -------------------------------------------------------------------------------- /static/images/image10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image10.jpg -------------------------------------------------------------------------------- /static/images/image11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image11.jpg -------------------------------------------------------------------------------- /static/images/image12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image12.jpg -------------------------------------------------------------------------------- /static/images/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image2.jpg -------------------------------------------------------------------------------- /static/images/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image3.jpg -------------------------------------------------------------------------------- /static/images/image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image4.jpg -------------------------------------------------------------------------------- /static/images/image5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image5.jpg -------------------------------------------------------------------------------- /static/images/image6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image6.jpg -------------------------------------------------------------------------------- /static/images/image7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image7.jpg -------------------------------------------------------------------------------- /static/images/image8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image8.jpg -------------------------------------------------------------------------------- /static/images/image9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/image9.jpg -------------------------------------------------------------------------------- /static/images/popup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/popup.jpg -------------------------------------------------------------------------------- /static/images/slider1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slider1.jpg -------------------------------------------------------------------------------- /static/images/slider2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slider2.jpg -------------------------------------------------------------------------------- /static/images/slider3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slider3.jpg -------------------------------------------------------------------------------- /static/images/slider4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slider4.jpg -------------------------------------------------------------------------------- /static/images/slider6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slider6.jpg -------------------------------------------------------------------------------- /static/images/them1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them1.jpg -------------------------------------------------------------------------------- /static/images/them1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them1.png -------------------------------------------------------------------------------- /static/images/them2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them2.jpg -------------------------------------------------------------------------------- /static/images/them3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them3.jpg -------------------------------------------------------------------------------- /static/images/them4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them4.jpg -------------------------------------------------------------------------------- /static/images/them6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/them6.jpg -------------------------------------------------------------------------------- /static/images/jusesimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/jusesimg.jpg -------------------------------------------------------------------------------- /static/images/soc_media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/soc_media.png -------------------------------------------------------------------------------- /static/images/spriteimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/spriteimg.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language = java 2 | *.css linguist-language = java 3 | *.html linguist-language = java 4 | -------------------------------------------------------------------------------- /static/images/slidertextbg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/images/slidertextbg1.png -------------------------------------------------------------------------------- /static/fonts/BEBAS___-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/BEBAS___-webfont.eot -------------------------------------------------------------------------------- /static/fonts/BEBAS___-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/BEBAS___-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/BEBAS___-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/BEBAS___-webfont.woff -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AlpacaWebService 2 | AlpacaWebService 是一个应用型web服务器 3 | # 4 | 点击下载 -------------------------------------------------------------------------------- /static/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /static/fonts/OpenSans-Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/OpenSans-Regular-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forwardbob/AlpacaWebService/HEAD/static/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /src/main/java/alpaca/paser/TypeParser.java: -------------------------------------------------------------------------------- 1 | package alpaca.paser; 2 | 3 | /** 4 | * Created by 腼腆的老黄 on 2017/9/27. 5 | */ 6 | public class TypeParser { 7 | } 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/test/java/alpaca/beans/AlpacaBeanInfoTest.java: -------------------------------------------------------------------------------- 1 | package alpaca.beans; 2 | 3 | import alpaca.conf.WebProperties; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Created by 腼腆的老黄 on 2017/10/11. 8 | */ 9 | public class AlpacaBeanInfoTest { 10 | @Test 11 | public void beanInfo() { 12 | AlpacaBeanInfo beanInfo =new AlpacaBeanInfo(WebProperties.class); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/alpaca/Startup.java: -------------------------------------------------------------------------------- 1 | package alpaca; 2 | 3 | 4 | import com.sun.org.apache.bcel.internal.util.ClassLoader; 5 | 6 | 7 | /** 8 | * Created by 腼腆的老黄 on 2017/9/27. 9 | */ 10 | public class Startup extends ClassLoader { 11 | public static void main(String[] args) throws Exception { 12 | Alpaca alpaca = new Alpaca(); 13 | alpaca.run(Startup.class); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/session/HttpSession.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.session; 2 | 3 | import java.util.HashMap; 4 | import java.util.UUID; 5 | 6 | /** 7 | * Created by 腼腆的老黄 on 2017/9/30. 8 | */ 9 | public class HttpSession extends HashMap { 10 | public static final String JSESSIONID="JSESSIONID"; 11 | 12 | private String sessionID= UUID.randomUUID().toString(); 13 | //private 14 | 15 | public String getSessionID() { 16 | return sessionID; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/alpaca/conf/WebProperties.java: -------------------------------------------------------------------------------- 1 | package alpaca.conf; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * Created by 腼腆的老黄 on 2017/10/9. 7 | */ 8 | public class WebProperties { 9 | public static Integer PORT=8844; 10 | public static String SESSION_NAME="AlpacaSession"; 11 | public static String WEB_PATH="/static"; 12 | public static String BASE_PATH=System.getProperty("user.dir"); 13 | public static String STATIC_PATH=BASE_PATH+"/"+WEB_PATH+"/"; 14 | public static File FILE403=null; 15 | public static File FILE404=null; 16 | } 17 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_all_4_1_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/java/alpaca/AlpacaTest.java: -------------------------------------------------------------------------------- 1 | package alpaca; 2 | 3 | import alpaca.beans.AlpacaBeanInfo; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Created by 腼腆的老黄 on 2017/9/27. 8 | */ 9 | 10 | public class AlpacaTest { 11 | @Test 12 | public void run() throws Exception { 13 | // AlpacaBeanInfo alpacaBeanInfo=new AlpacaBeanInfo(ServerConfig.class); 14 | 15 | } 16 | 17 | @org.junit.Test 18 | public void assembleWebConfig() throws Exception { 19 | Alpaca alpaca=new Alpaca(); 20 | } 21 | 22 | public static void main(String[] args) { 23 | Alpaca alpaca=new Alpaca(); 24 | 25 | // AlpacaBeanInfo alpacaBeanInfo=new AlpacaBeanInfo(ServerConfig.class); 26 | // alpaca.setBeanValue(new AlpacaBeanInfo(ServerConfig.class),"port",0); 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/servlet/HttpServlet.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.servlet; 2 | 3 | /** 4 | * Created by 腼腆的老黄 on 2017/9/29. 5 | */ 6 | public abstract class HttpServlet { 7 | public void service(HttpServletRequest request, HttpServletResponse response) { 8 | try { 9 | if ("GET".equals(request.getMethod())) { 10 | doGet(request, response); 11 | } else { 12 | doPost(request, response); 13 | } 14 | } catch (Exception e) { 15 | e.printStackTrace(); 16 | } 17 | } 18 | 19 | public abstract void doGet(HttpServletRequest request, HttpServletResponse response)throws Exception; 20 | 21 | 22 | public abstract void doPost(HttpServletRequest request, HttpServletResponse response)throws Exception; 23 | } 24 | -------------------------------------------------------------------------------- /dependency-reduced-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | cn.whitecao.alpaca 5 | AlpacaWebServer 6 | 1.0-SNAPSHOT 7 | 8 | 9 | 10 | maven-shade-plugin 11 | 2.3 12 | 13 | 14 | package 15 | 16 | shade 17 | 18 | 19 | 20 | 21 | 22 | 23 | alpaca.Startup 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /AlpacaWebServer.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/session/HttpSessionManager.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.session; 2 | 3 | /** 4 | * Created by 腼腆的老黄 on 2017/9/30. 5 | */ 6 | 7 | import java.util.HashMap; 8 | 9 | /** 10 | * HttpSession管理器 11 | */ 12 | public class HttpSessionManager { 13 | 14 | private static final HashMap sessionMap = new HashMap(); 15 | 16 | private HttpSessionManager() { 17 | } 18 | 19 | /** 20 | * 创建一个session并返回sessionId 21 | * @return 22 | */ 23 | public static String getSessionId(){ 24 | synchronized (sessionMap) { 25 | HttpSession httpSession = new HttpSession(); 26 | sessionMap.put(httpSession.getSessionID(), httpSession); 27 | return httpSession.getSessionID(); 28 | } 29 | } 30 | 31 | /** 32 | * 根据sessionId获取session信息 33 | * @param sessionId 34 | * @return 35 | */ 36 | public static HttpSession getSession(String sessionId){ 37 | return sessionMap.get(sessionId); 38 | } 39 | 40 | /** 41 | * 判断服务器是否包含该客户端的session信息 42 | * @param sessiondId 43 | * @return 44 | */ 45 | public static boolean isHasJsessionId(String sessiondId){ 46 | synchronized (sessionMap) { 47 | return sessionMap.containsKey(sessiondId); 48 | } 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/main/java/alpaca/http/template/StaticServlet.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.template; 2 | 3 | import alpaca.conf.WebProperties; 4 | import alpaca.http.servlet.HttpServlet; 5 | import alpaca.http.servlet.HttpServletRequest; 6 | import alpaca.http.servlet.HttpServletResponse; 7 | 8 | import java.io.File; 9 | 10 | import static alpaca.conf.WebProperties.FILE403; 11 | import static alpaca.conf.WebProperties.FILE404; 12 | 13 | /** 14 | * Created by 腼腆的老黄 on 2017/10/11. 15 | */ 16 | public class StaticServlet extends HttpServlet { 17 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws Exception { 18 | String rm = ""; 19 | //判断是不是首页 20 | if (request.getServletPath().equals("/")) { 21 | response.setIndex(); 22 | return; 23 | } else { 24 | rm = WebProperties.STATIC_PATH + request.getServletPath(); 25 | } 26 | File file = new File(rm); 27 | 28 | //判断是否存在,路径 29 | if (file.isDirectory()) { 30 | response.set403(FILE403); 31 | } else if (!file.exists()) { 32 | response.set404(FILE404); 33 | } else { 34 | response.content(file); 35 | } 36 | } 37 | 38 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws Exception { 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /static/js/responsive-nav.js: -------------------------------------------------------------------------------- 1 | 2 | var ww = document.body.clientWidth; 3 | 4 | $(document).ready(function() { 5 | $(".nav li a").each(function() { 6 | if ($(this).next().length > 0) { 7 | $(this).addClass("parent"); 8 | }; 9 | }) 10 | 11 | $(".toggleMenu").click(function(e) { 12 | e.preventDefault(); 13 | $(this).toggleClass("active"); 14 | $(".nav").toggle(); 15 | }); 16 | adjustMenu(); 17 | }) 18 | 19 | $(window).bind('resize orientationchange', function() { 20 | ww = document.body.clientWidth; 21 | adjustMenu(); 22 | }); 23 | 24 | var adjustMenu = function() { 25 | if (ww < 800) { 26 | $(".toggleMenu").css("display", "inline-block"); 27 | if (!$(".toggleMenu").hasClass("active")) { 28 | $(".nav").hide(); 29 | } else { 30 | $(".nav").show(); 31 | } 32 | $(".nav li").unbind('mouseenter mouseleave'); 33 | $(".nav li a.parent").unbind('click').bind('click', function(e) { 34 | // must be attached to anchor element to prevent bubbling 35 | e.preventDefault(); 36 | $(this).parent("li").toggleClass("hover"); 37 | }); 38 | } 39 | else if (ww >= 800) { 40 | $(".toggleMenu").css("display", "none"); 41 | $(".nav").show(); 42 | $(".nav li").removeClass("hover"); 43 | $(".nav li a").unbind('click'); 44 | $(".nav li").unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() { 45 | // must be attached to li so that mouseleave is not triggered when hover over submenu 46 | $(this).toggleClass('hover'); 47 | }); 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/main/java/alpaca/beans/BeanWrapper.java: -------------------------------------------------------------------------------- 1 | package alpaca.beans; 2 | 3 | import java.beans.PropertyDescriptor; 4 | import java.lang.reflect.InvocationTargetException; 5 | import java.util.List; 6 | 7 | /** 8 | * Created by 腼腆的老黄 on 2017/9/27. 9 | */ 10 | public class BeanWrapper { 11 | /** 12 | * @param beanInfo 13 | * @param k 14 | * @param v 15 | */ 16 | public static void setBeanValue(AlpacaBeanInfo beanInfo, String k, Object v) { 17 | Class beanClass = beanInfo.getMyClass(); 18 | List propertyDescriptors = beanInfo.getPropertyDescriptors(); 19 | for (PropertyDescriptor descriptor :propertyDescriptors) { 20 | if (descriptor.getName().equals(k)) { 21 | try { 22 | System.out.println(descriptor.getPropertyType().getName()); 23 | //todo:这特么的要写个类型转换工具 用继承 24 | //不能这么写死 25 | if (descriptor.getPropertyType().getName().equals("int")) { 26 | descriptor.getWriteMethod().invoke(beanInfo.getRef(),Integer.parseInt((String)v)); 27 | } else { 28 | descriptor.getWriteMethod().invoke(beanInfo.getRef(), v); 29 | } 30 | break; 31 | } catch (IllegalAccessException e) { 32 | e.printStackTrace(); 33 | } catch (InvocationTargetException e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | cn.whitecao.alpaca 8 | AlpacaWebServer 9 | 1.0-SNAPSHOT 10 | 11 | 12 | junit 13 | junit 14 | 4.12 15 | 16 | 17 | 18 | io.netty 19 | netty-all 20 | 4.1.2.Final 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.apache.maven.plugins 28 | maven-shade-plugin 29 | 2.3 30 | 31 | 32 | 33 | alpaca.Startup 34 | 35 | 36 | 37 | 38 | 39 | package 40 | 41 | shade 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/alpaca/Alpaca.java: -------------------------------------------------------------------------------- 1 | package alpaca; 2 | 3 | 4 | import alpaca.beans.AlpacaBeanInfo; 5 | import alpaca.beans.BeanWrapper; 6 | import alpaca.conf.WebProperties; 7 | import alpaca.http.HttpServer; 8 | 9 | import java.beans.PropertyDescriptor; 10 | import java.io.File; 11 | import java.io.FileInputStream; 12 | import java.io.InputStream; 13 | import java.lang.reflect.Field; 14 | import java.util.*; 15 | 16 | import static alpaca.conf.WebProperties.BASE_PATH; 17 | 18 | /** 19 | * Created by 腼腆的老黄 on 2017/9/27. 20 | */ 21 | public class Alpaca { 22 | private Properties properties = new Properties(); 23 | private AlpacaBeanInfo serverConfigInfo; 24 | 25 | public void run(Class startupClass) { 26 | //读取配置文件 27 | try { 28 | File file=new File(BASE_PATH+"/conf/web.properties"); 29 | InputStream inputStream = new FileInputStream(file); 30 | properties = new Properties(); 31 | properties.load(inputStream); 32 | initProperties(); 33 | //todo:拼装配置文件 WebProperties 34 | } catch (Exception e) { 35 | e.printStackTrace(); 36 | } 37 | 38 | try { 39 | startServer(); 40 | } catch (Exception e) { 41 | e.printStackTrace(); 42 | } 43 | } 44 | 45 | 46 | public void startServer()throws Exception { 47 | HttpServer httpServer=new HttpServer(); 48 | httpServer.startServer(); 49 | } 50 | 51 | public void initProperties(){ 52 | Iterator it=properties.entrySet().iterator(); 53 | while(it.hasNext()){ 54 | try { 55 | Map.Entry entry=(Map.Entry)it.next(); 56 | Object key = entry.getKey(); 57 | Object value = entry.getValue(); 58 | System.out.println(key +":"+value); 59 | Field field = WebProperties.class.getField(key.toString().toUpperCase()); 60 | if (field.getType()==Integer.class){ 61 | field.set(null,Integer.parseInt(value.toString())); 62 | }else if (field.getType()==String.class){ 63 | field.set(null,value); 64 | } 65 | } catch (Exception e) { 66 | e.printStackTrace(); 67 | } 68 | } 69 | 70 | } 71 | } 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/handler/NettyHandler.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.handler; 2 | 3 | import alpaca.http.servlet.HttpServlet; 4 | import alpaca.http.servlet.HttpServletRequest; 5 | import alpaca.http.servlet.HttpServletResponse; 6 | import alpaca.http.template.StaticServlet; 7 | import io.netty.buffer.ByteBuf; 8 | import io.netty.channel.ChannelHandlerContext; 9 | import io.netty.channel.ChannelInboundHandlerAdapter; 10 | import io.netty.handler.codec.http.FullHttpRequest; 11 | import io.netty.handler.codec.http.HttpContent; 12 | import io.netty.handler.codec.http.HttpRequest; 13 | 14 | import java.io.File; 15 | 16 | import static alpaca.conf.WebProperties.FILE404; 17 | import static alpaca.conf.WebProperties.STATIC_PATH; 18 | 19 | /** 20 | * Created by 腼腆的老黄 on 2017/10/1. 21 | */ 22 | public class NettyHandler extends ChannelInboundHandlerAdapter { 23 | HttpRequest request; 24 | 25 | @Override 26 | public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { 27 | 28 | if (msg instanceof HttpRequest) { 29 | request = (FullHttpRequest) msg; 30 | } 31 | if (msg instanceof HttpContent) { 32 | HttpContent content = (HttpContent) msg; 33 | ByteBuf buf = content.content(); 34 | HttpServletRequest httpServletRequest = new HttpServletRequest(request, ctx); 35 | HttpServletResponse httpServletResponse = new HttpServletResponse(httpServletRequest, ctx); 36 | boolean isMatch = false; 37 | String rm = STATIC_PATH + httpServletRequest.getServletPath(); 38 | try { 39 | File files = new File(rm); 40 | if (files.exists()) { 41 | //调用静态资源servlet 42 | HttpServlet staticServlet = new StaticServlet(); 43 | staticServlet.service(httpServletRequest, httpServletResponse); 44 | isMatch = true; 45 | } else { 46 | //调用配置文件中的servlet 47 | //find Servlet 48 | // 修改isMatch的标志 49 | //404是否交给ServletHandler 50 | } 51 | //还是没匹配到就404 52 | if (isMatch == false) { 53 | httpServletResponse.set404(FILE404); 54 | } 55 | } catch (Exception e) { 56 | e.printStackTrace(); 57 | } finally { 58 | httpServletResponse.fuck(); 59 | } 60 | } 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/HttpServer.java: -------------------------------------------------------------------------------- 1 | package alpaca.http; 2 | 3 | import alpaca.http.handler.NettyHandler; 4 | import io.netty.bootstrap.ServerBootstrap; 5 | import io.netty.channel.ChannelFuture; 6 | import io.netty.channel.ChannelInitializer; 7 | import io.netty.channel.ChannelOption; 8 | import io.netty.channel.EventLoopGroup; 9 | import io.netty.channel.nio.NioEventLoopGroup; 10 | import io.netty.channel.socket.SocketChannel; 11 | import io.netty.channel.socket.nio.NioServerSocketChannel; 12 | import io.netty.handler.codec.http.HttpObjectAggregator; 13 | import io.netty.handler.codec.http.HttpRequestDecoder; 14 | import io.netty.handler.codec.http.HttpResponseEncoder; 15 | import io.netty.handler.stream.ChunkedWriteHandler; 16 | 17 | import static alpaca.conf.WebProperties.PORT; 18 | 19 | /** 20 | * Created by 腼腆的老黄 on 2017/10/11. 21 | */ 22 | public class HttpServer { 23 | public void start(int port) throws Exception { 24 | EventLoopGroup bossGroup = new NioEventLoopGroup(); 25 | EventLoopGroup workerGroup = new NioEventLoopGroup(); 26 | try { 27 | ServerBootstrap b = new ServerBootstrap(); 28 | b.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class) 29 | .childHandler(new ChannelInitializer() { 30 | @Override 31 | public void initChannel(SocketChannel ch) throws Exception { 32 | ch.pipeline().addLast(new ChunkedWriteHandler()); 33 | // server端发送的是httpResponse,所以要使用HttpResponseEncoder进行编码 34 | ch.pipeline().addLast(new HttpResponseEncoder()); 35 | // server端接收到的是httpRequest,所以要使用HttpRequestDecoder进行解码 36 | ch.pipeline().addLast(new HttpRequestDecoder()); 37 | ch.pipeline().addLast(new HttpObjectAggregator(10240)); 38 | ch.pipeline().addLast(new NettyHandler()); 39 | } 40 | }).option(ChannelOption.SO_BACKLOG, 128) 41 | .option(ChannelOption.SO_TIMEOUT, 5 * 1000) 42 | .childOption(ChannelOption.SO_KEEPALIVE, true); 43 | 44 | ChannelFuture f = b.bind(port).sync(); 45 | 46 | f.channel().closeFuture().sync(); 47 | } finally { 48 | workerGroup.shutdownGracefully(); 49 | bossGroup.shutdownGracefully(); 50 | } 51 | } 52 | 53 | public void startServer() throws Exception { 54 | HttpServer server = new HttpServer(); 55 | // log.info("Http Server listening on 8844 ..."); 56 | System.out.println("成功监听"+PORT); 57 | server.start(PORT); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/alpaca/beans/AlpacaBeanInfo.java: -------------------------------------------------------------------------------- 1 | package alpaca.beans; 2 | 3 | import java.beans.BeanDescriptor; 4 | import java.beans.IntrospectionException; 5 | import java.beans.PropertyDescriptor; 6 | import java.lang.reflect.Field; 7 | import java.lang.reflect.Method; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * Created by 腼腆的老黄 on 2017/9/26. 13 | */ 14 | public class AlpacaBeanInfo { 15 | //方法 16 | private Method[] methods; 17 | //属性描述 18 | private List propertyDescriptors = new ArrayList(); 19 | //bean描述 20 | private BeanDescriptor beanDescriptor = null; 21 | //反射实例化的引用 22 | private Object ref=null; 23 | //class name 24 | private String name; 25 | private Class aClass; 26 | public AlpacaBeanInfo(Class beanClass) { 27 | this.methods = beanClass.getMethods(); 28 | this.propertyDescriptors=getAllPropertyDescriptor(beanClass,propertyDescriptors); 29 | this.beanDescriptor=new BeanDescriptor(beanClass); 30 | try { 31 | this.ref=beanClass.newInstance(); 32 | }catch (Exception e){} 33 | this.name=beanClass.getName(); 34 | 35 | } 36 | 37 | 38 | /** 39 | * 返回bean的属性详情 40 | * @param beanClass 41 | * @param list 42 | * @return 43 | */ 44 | private List getAllPropertyDescriptor(Class beanClass,List list){ 45 | Field[] fields = beanClass.getDeclaredFields(); 46 | for (Field field:fields){ 47 | String fieldName = field.getName(); 48 | try { 49 | PropertyDescriptor descriptor = new PropertyDescriptor(fieldName, beanClass); 50 | list.add(descriptor); 51 | } catch (IntrospectionException e) { 52 | } 53 | 54 | } 55 | return list; 56 | } 57 | 58 | public Method[] getMethods() { 59 | return methods; 60 | } 61 | 62 | public void setMethods(Method[] methods) { 63 | this.methods = methods; 64 | } 65 | 66 | public List getPropertyDescriptors() { 67 | return propertyDescriptors; 68 | } 69 | 70 | public void setPropertyDescriptors(List propertyDescriptors) { 71 | this.propertyDescriptors = propertyDescriptors; 72 | } 73 | 74 | public BeanDescriptor getBeanDescriptor() { 75 | return beanDescriptor; 76 | } 77 | 78 | public void setBeanDescriptor(BeanDescriptor beanDescriptor) { 79 | this.beanDescriptor = beanDescriptor; 80 | } 81 | 82 | public T getRef() { 83 | return (T) ref; 84 | } 85 | 86 | public String getName() { 87 | return name; 88 | } 89 | 90 | public Class getMyClass() { 91 | return aClass; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /static/css/JFAlert.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* alert common styles */ 4 | div.alert{ 5 | border : 0; 6 | width : auto; 7 | display : block; 8 | position : relative; 9 | font-size : 14px; 10 | padding : 12px 38px 14px 18px; 11 | } 12 | 13 | .alert a.close:hover { color: #fff !important; } 14 | 15 | .alert.bordered { 16 | border-width: 1px; 17 | border-style: solid; 18 | } 19 | 20 | .alert.rounded { 21 | -moz-border-radius : 5px; 22 | -webkit-border-radius: 5px; 23 | border-radius : 5px; 24 | } 25 | 26 | 27 | /* alert message common styles */ 28 | .alert.message a.close:hover { background:#467812} 29 | .alert.message a.close { color : #467812 } 30 | 31 | /* alert success common styles */ 32 | .alert.success a.close:hover { background: #EB5439 } 33 | .alert.success a.close { color :#EB5439 } 34 | 35 | /* alert error common styles */ 36 | .alert.error a.close:hover { background: #FAB418 } 37 | .alert.error a.close { color : #FAB418 } 38 | 39 | /* alert info common styles */ 40 | .alert.info a.close:hover { background: #427AB4; } 41 | .alert.info a.close { color : #32608f; } 42 | 43 | /* alert warning common styles */ 44 | .alert.warning a.close:hover { background: #d8d8a8; } 45 | .alert.warning a.close { color : #cfd0a4; } 46 | 47 | /* alert question common styles */ 48 | .alert.question a.close:hover { background: #8a64b5; } 49 | .alert.question a.close { color : #784da6; } 50 | 51 | 52 | .alert.message { 53 | background : #c6c7c9; 54 | border-color: #467812; 55 | 56 | } 57 | 58 | 59 | .alert.success { 60 | background : #5c9c1b; 61 | border-color: #467812; 62 | color : #fff; 63 | } 64 | 65 | 66 | .alert.error { 67 | background : #d01b1d; 68 | border-color: #980608; 69 | 70 | color : #fff; 71 | } 72 | 73 | .alert.info { 74 | border-color: #32608f; 75 | background : #4988c8; 76 | color : #fff; 77 | } 78 | 79 | .alert.warning { 80 | border-color: #cfd0a4; 81 | background : #f0f1bb; 82 | 83 | } 84 | 85 | 86 | .alert.question { 87 | border-color: #784da6; 88 | background : #9a6fc9; 89 | 90 | color : #fff; 91 | } 92 | 93 | .alert a.close { 94 | position : absolute; 95 | top : 11px; 96 | right : 12px; 97 | float : right; 98 | padding : 0px 5px 4px; 99 | line-height : 17px; 100 | margin-left : 17px; 101 | text-shadow : none; 102 | -moz-border-radius : 15px; 103 | -webkit-border-radius: 15px; 104 | border-radius : 15px; 105 | font-family : Tahoma; 106 | color : #fff; 107 | font-size : 16px; 108 | font-weight : bold; 109 | text-decoration : none; 110 | } -------------------------------------------------------------------------------- /static/js/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - EASING EQUATIONS 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2001 Robert Penner 12 | * All rights reserved. 13 | * 14 | * TERMS OF USE - jQuery Easing 15 | * 16 | * Open source under the BSD License. 17 | * 18 | * Copyright © 2008 George McGinley Smith 19 | * All rights reserved. 20 | * 21 | * Redistribution and use in source and binary forms, with or without modification, 22 | * are permitted provided that the following conditions are met: 23 | * 24 | * Redistributions of source code must retain the above copyright notice, this list of 25 | * conditions and the following disclaimer. 26 | * Redistributions in binary form must reproduce the above copyright notice, this list 27 | * of conditions and the following disclaimer in the documentation and/or other materials 28 | * provided with the distribution. 29 | * 30 | * Neither the name of the author nor the names of contributors may be used to endorse 31 | * or promote products derived from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 34 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 35 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 36 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 37 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 39 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 41 | * OF THE POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | */ 44 | jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g decode = ServerCookieDecoder.LAX.decode(s); 73 | Cookie[] cookies = new Cookie[decode.size()]; 74 | decode.toArray(cookies); 75 | return cookies; 76 | } 77 | 78 | /** 79 | * 获取session 80 | * 81 | * @return 82 | */ 83 | public HttpSession getSession() { 84 | Cookie[] cookies = getCookies(); 85 | if (null != cookies) { 86 | for (Cookie cookie : cookies) { 87 | if (WebProperties.SESSION_NAME.equals(cookie.name())) { 88 | //判断这个cookie中存的session是否和服务器一致 89 | if (HttpSessionManager.isHasJsessionId(cookie.value())) { 90 | return HttpSessionManager.getSession(cookie.value()); 91 | } 92 | break; 93 | } 94 | } 95 | } 96 | return createSession(); 97 | } 98 | 99 | /** 100 | * 获取请求类型 101 | * 102 | * @return 103 | */ 104 | public String getMethod() { 105 | return nettyRequest.getMethod().name(); 106 | } 107 | 108 | /** 109 | * 后面跟着的那个玩意儿 110 | * 111 | * @return 112 | */ 113 | public String getQueryString() { 114 | String s = ""; 115 | try { 116 | s = URLDecoder.decode(nettyRequest.uri().toString(), "utf-8"); 117 | } catch (UnsupportedEncodingException e) { 118 | s = nettyRequest.uri().toString(); 119 | } 120 | String[] temp = s.split("\\?"); 121 | if (temp.length == 1) { 122 | return null; 123 | } else { 124 | return temp[1]; 125 | } 126 | } 127 | 128 | public boolean keepAlive() { 129 | return isKeepAlive(nettyRequest); 130 | } 131 | 132 | /** 133 | * 获取参数 134 | * 135 | * @return 136 | */ 137 | public Map getParameterMap() { 138 | Map map = new HashMap(); 139 | if (getMethod().equals("GET")) { 140 | String queryString = getQueryString(); 141 | if (StringUtil.isNullOrEmpty(queryString)) { 142 | return map; 143 | } 144 | String[] split = queryString.split("&"); 145 | //判断是否存在&号 146 | if (split.length == 1) { 147 | setParam(map, queryString); 148 | } else { 149 | for (String splited : split) { 150 | setParam(map, splited); 151 | } 152 | } 153 | } else if (getMethod().equals("POST")) { 154 | HttpPostRequestDecoder decoder = new HttpPostRequestDecoder(nettyRequest); 155 | decoder.offer((FullHttpRequest) nettyRequest); 156 | 157 | List parmList = decoder.getBodyHttpDatas(); 158 | 159 | for (InterfaceHttpData parm : parmList) { 160 | 161 | Attribute data = (Attribute) parm; 162 | try { 163 | String value = data.getValue(); 164 | String name = data.getName(); 165 | map.put(name, value); 166 | } catch (IOException e) { 167 | e.printStackTrace(); 168 | } 169 | } 170 | nettyRequest.setMethod(HttpMethod.GET); 171 | Map parameterMap = getParameterMap(); 172 | map.putAll(parameterMap); 173 | } 174 | return map; 175 | } 176 | 177 | private void setParam(Map map, String s) { 178 | String[] kv = s.split("="); 179 | //判断参数是否存在=号 180 | if (kv.length == 1) { 181 | map.put(kv, null); 182 | } else { 183 | map.put(kv[0], kv[1]); 184 | } 185 | } 186 | 187 | private HttpSession createSession() { 188 | String sessionId = HttpSessionManager.getSessionId(); 189 | HttpSession session = HttpSessionManager.getSession(sessionId); 190 | this.session = session; 191 | return session; 192 | } 193 | 194 | } 195 | -------------------------------------------------------------------------------- /src/main/java/alpaca/http/servlet/HttpServletResponse.java: -------------------------------------------------------------------------------- 1 | package alpaca.http.servlet; 2 | 3 | import alpaca.conf.WebProperties; 4 | import alpaca.http.session.HttpSession; 5 | import io.netty.buffer.ByteBuf; 6 | import io.netty.buffer.Unpooled; 7 | import io.netty.channel.ChannelFuture; 8 | import io.netty.channel.ChannelFutureListener; 9 | import io.netty.channel.ChannelHandlerContext; 10 | import io.netty.handler.codec.http.*; 11 | import io.netty.handler.codec.http.cookie.Cookie; 12 | import io.netty.handler.codec.http.cookie.DefaultCookie; 13 | import io.netty.handler.stream.ChunkedFile; 14 | 15 | import java.io.File; 16 | import java.io.FileNotFoundException; 17 | import java.io.RandomAccessFile; 18 | import java.net.URLConnection; 19 | import java.nio.charset.Charset; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | import static alpaca.conf.WebProperties.SESSION_NAME; 24 | import static io.netty.handler.codec.http.HttpHeaders.Names.*; 25 | /** 26 | * Created by 腼腆的老黄 on 2017/9/29. 27 | */ 28 | public class HttpServletResponse { 29 | 30 | List cookies = new ArrayList(); 31 | HttpServletRequest request; 32 | ChannelHandlerContext ctx; 33 | private HttpVersion version; 34 | private HttpResponseStatus status = HttpResponseStatus.OK; 35 | private HttpHeaders headers; 36 | private Object content; 37 | private Charset charset = Charset.forName("UTF-8"); 38 | private boolean keepAlive = false; 39 | private boolean isSend = false; 40 | 41 | public HttpServletResponse(HttpServletRequest request, ChannelHandlerContext ctx) { 42 | this.ctx = ctx; 43 | this.request = request; 44 | this.version = HttpVersion.HTTP_1_1; 45 | this.status = HttpResponseStatus.OK; 46 | this.headers = new DefaultHttpHeaders(); 47 | this.content = Unpooled.EMPTY_BUFFER; 48 | this.keepAlive = request.keepAlive(); 49 | } 50 | 51 | /** 52 | * 响应为静态资源 53 | * 54 | * @param file 55 | * @return 56 | */ 57 | public HttpServletResponse content(File file) { 58 | content = file; 59 | return this; 60 | } 61 | 62 | /** 63 | * 响应内容为普通文本 64 | */ 65 | public HttpServletResponse content(String str) { 66 | contentTypeTextPlain(); 67 | content = Unpooled.copiedBuffer(str, charset); 68 | return this; 69 | } 70 | 71 | /** 72 | * 设置 contentType 为 text/plain 73 | */ 74 | public HttpServletResponse contentTypeTextPlain() { 75 | headers.set(CONTENT_TYPE, "text/plain; charset=" + charset); 76 | return this; 77 | } 78 | 79 | /** 80 | * 设置 contentType 为 text/html 81 | */ 82 | public HttpServletResponse contentTypeTextHtml() { 83 | headers.set(CONTENT_TYPE, "text/html; charset=" + charset); 84 | return this; 85 | } 86 | 87 | /** 88 | * 设置成403拒绝访问 89 | * 90 | * @param file 91 | */ 92 | public void set403(File file) { 93 | status = HttpResponseStatus.FORBIDDEN; 94 | if (file == null || !file.exists() || file.isDirectory()) { 95 | content = Unpooled.copiedBuffer("

403页面拒绝访问

", charset); 96 | contentTypeTextHtml(); 97 | } else { 98 | content(file); 99 | } 100 | } 101 | 102 | /** 103 | * 设置成404 104 | * @param file 105 | */ 106 | public void set404(File file) { 107 | status = HttpResponseStatus.NOT_FOUND; 108 | if (file == null || !file.exists() || file.isDirectory()) { 109 | content = Unpooled.copiedBuffer("

404页面无法找到

", charset); 110 | contentTypeTextHtml(); 111 | } else { 112 | content(file); 113 | } 114 | } 115 | 116 | public void setIndex(){ 117 | File file=new File(WebProperties.STATIC_PATH+"index.html"); 118 | if (file==null||!file.exists()){ 119 | set404(WebProperties.FILE404); 120 | }else { 121 | content(file); 122 | } 123 | } 124 | 125 | public void addCookie(Cookie cookie) { 126 | headers.add(HttpHeaderNames.SET_COOKIE, cookie); 127 | } 128 | 129 | public void sendRedirect(String Url) { 130 | 131 | } 132 | 133 | public void sendError(int code, String msg) { 134 | 135 | } 136 | 137 | public void sendError(int code) { 138 | 139 | } 140 | 141 | public void setContentType(String str) { 142 | 143 | } 144 | 145 | public void fuck() throws Exception { 146 | if (isSend) { 147 | return; 148 | } 149 | //判断是否回写session 150 | HttpSession session=request.isChangeSession(); 151 | if(session!=null){ 152 | Cookie defaultCookie = new DefaultCookie(SESSION_NAME, session.getSessionID()); 153 | addCookie(defaultCookie); 154 | } 155 | //判断content的类型 156 | if (content instanceof File) { 157 | File file = (File) content; 158 | RandomAccessFile randomAccessFile = null; 159 | try { 160 | randomAccessFile = new RandomAccessFile(file, "r"); 161 | } catch (FileNotFoundException fnfd) { 162 | // sendError(ctx, HttpResponseStatus.NOT_FOUND); 163 | return; 164 | } 165 | long fileLength = randomAccessFile.length(); 166 | HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status); 167 | response.headers().set(headers); 168 | response.headers().set(CONTENT_LENGTH, fileLength); 169 | response.headers().set(CONTENT_TYPE, parseFileMimeType(file.getName())); 170 | if (keepAlive) { 171 | response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE); 172 | } 173 | ctx.write(response); 174 | ChannelFuture sendFileFuture = null; 175 | sendFileFuture = ctx.write(new ChunkedFile(randomAccessFile, 0, fileLength, 99999)); 176 | ChannelFuture lastContentFuture = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); 177 | if (!keepAlive) { 178 | lastContentFuture.addListener(ChannelFutureListener.CLOSE); 179 | } else { 180 | response.headers().set(CONTENT_LENGTH, response.headers().get(CONTENT_LENGTH)); 181 | } 182 | } else { 183 | // 普通文本 184 | FullHttpResponse fullHttpResponse = convertFullHttpResponse(); 185 | // 若是长连接且不需要关闭,响应头信息配置为 长连接 186 | if (keepAlive) { 187 | HttpUtil.setKeepAlive(fullHttpResponse, true); 188 | } 189 | ctx.writeAndFlush(fullHttpResponse); 190 | } 191 | 192 | isSend = true; 193 | 194 | } 195 | 196 | private FullHttpResponse convertFullHttpResponse() { 197 | ByteBuf tempByteBuf = (ByteBuf) content; 198 | headers.set(CONTENT_LENGTH, tempByteBuf.readableBytes()); 199 | headers.set(CONTENT_ENCODING, charset); 200 | return new DefaultFullHttpResponse(version, status, tempByteBuf, headers, new DefaultHttpHeaders()); 201 | } 202 | 203 | /** 204 | * 根据文件名字解析出文件类型.默认 二进制 格式 205 | */ 206 | private String parseFileMimeType(String fileName) { 207 | String typeFor = URLConnection.getFileNameMap().getContentTypeFor(fileName); 208 | if (typeFor == null || typeFor.trim().length() == 0) { 209 | // 无法识别默认使用数据流 210 | if (fileName.endsWith(".css")) { 211 | typeFor = "text/css"; 212 | } else if (fileName.endsWith(".js")) { 213 | typeFor = "application/x-javascript"; 214 | } else 215 | typeFor = "application/octet-stream"; 216 | } 217 | 218 | return typeFor; 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /static/js/jquery.easing.1.3.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - jQuery Easing 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2008 George McGinley Smith 12 | * All rights reserved. 13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 17 | * Redistributions of source code must retain the above copyright notice, this list of 18 | * conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above copyright notice, this list 20 | * of conditions and the following disclaimer in the documentation and/or other materials 21 | * provided with the distribution. 22 | * 23 | * Neither the name of the author nor the names of contributors may be used to endorse 24 | * or promote products derived from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 27 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 29 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 31 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 32 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 34 | * OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | */ 37 | 38 | // t: current time, b: begInnIng value, c: change In value, d: duration 39 | jQuery.easing['jswing'] = jQuery.easing['swing']; 40 | 41 | jQuery.extend( jQuery.easing, 42 | { 43 | def: 'easeOutQuad', 44 | swing: function (x, t, b, c, d) { 45 | //alert(jQuery.easing.default); 46 | return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 47 | }, 48 | easeInQuad: function (x, t, b, c, d) { 49 | return c*(t/=d)*t + b; 50 | }, 51 | easeOutQuad: function (x, t, b, c, d) { 52 | return -c *(t/=d)*(t-2) + b; 53 | }, 54 | easeInOutQuad: function (x, t, b, c, d) { 55 | if ((t/=d/2) < 1) return c/2*t*t + b; 56 | return -c/2 * ((--t)*(t-2) - 1) + b; 57 | }, 58 | easeInCubic: function (x, t, b, c, d) { 59 | return c*(t/=d)*t*t + b; 60 | }, 61 | easeOutCubic: function (x, t, b, c, d) { 62 | return c*((t=t/d-1)*t*t + 1) + b; 63 | }, 64 | easeInOutCubic: function (x, t, b, c, d) { 65 | if ((t/=d/2) < 1) return c/2*t*t*t + b; 66 | return c/2*((t-=2)*t*t + 2) + b; 67 | }, 68 | easeInQuart: function (x, t, b, c, d) { 69 | return c*(t/=d)*t*t*t + b; 70 | }, 71 | easeOutQuart: function (x, t, b, c, d) { 72 | return -c * ((t=t/d-1)*t*t*t - 1) + b; 73 | }, 74 | easeInOutQuart: function (x, t, b, c, d) { 75 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 76 | return -c/2 * ((t-=2)*t*t*t - 2) + b; 77 | }, 78 | easeInQuint: function (x, t, b, c, d) { 79 | return c*(t/=d)*t*t*t*t + b; 80 | }, 81 | easeOutQuint: function (x, t, b, c, d) { 82 | return c*((t=t/d-1)*t*t*t*t + 1) + b; 83 | }, 84 | easeInOutQuint: function (x, t, b, c, d) { 85 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 86 | return c/2*((t-=2)*t*t*t*t + 2) + b; 87 | }, 88 | easeInSine: function (x, t, b, c, d) { 89 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 90 | }, 91 | easeOutSine: function (x, t, b, c, d) { 92 | return c * Math.sin(t/d * (Math.PI/2)) + b; 93 | }, 94 | easeInOutSine: function (x, t, b, c, d) { 95 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 96 | }, 97 | easeInExpo: function (x, t, b, c, d) { 98 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 99 | }, 100 | easeOutExpo: function (x, t, b, c, d) { 101 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 102 | }, 103 | easeInOutExpo: function (x, t, b, c, d) { 104 | if (t==0) return b; 105 | if (t==d) return b+c; 106 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 107 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 108 | }, 109 | easeInCirc: function (x, t, b, c, d) { 110 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 111 | }, 112 | easeOutCirc: function (x, t, b, c, d) { 113 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 114 | }, 115 | easeInOutCirc: function (x, t, b, c, d) { 116 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 117 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 118 | }, 119 | easeInElastic: function (x, t, b, c, d) { 120 | var s=1.70158;var p=0;var a=c; 121 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 122 | if (a < Math.abs(c)) { a=c; var s=p/4; } 123 | else var s = p/(2*Math.PI) * Math.asin (c/a); 124 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 125 | }, 126 | easeOutElastic: function (x, t, b, c, d) { 127 | var s=1.70158;var p=0;var a=c; 128 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 129 | if (a < Math.abs(c)) { a=c; var s=p/4; } 130 | else var s = p/(2*Math.PI) * Math.asin (c/a); 131 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 132 | }, 133 | easeInOutElastic: function (x, t, b, c, d) { 134 | var s=1.70158;var p=0;var a=c; 135 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 136 | if (a < Math.abs(c)) { a=c; var s=p/4; } 137 | else var s = p/(2*Math.PI) * Math.asin (c/a); 138 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 139 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 140 | }, 141 | easeInBack: function (x, t, b, c, d, s) { 142 | if (s == undefined) s = 1.70158; 143 | return c*(t/=d)*t*((s+1)*t - s) + b; 144 | }, 145 | easeOutBack: function (x, t, b, c, d, s) { 146 | if (s == undefined) s = 1.70158; 147 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 148 | }, 149 | easeInOutBack: function (x, t, b, c, d, s) { 150 | if (s == undefined) s = 1.70158; 151 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 152 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 153 | }, 154 | easeInBounce: function (x, t, b, c, d) { 155 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 156 | }, 157 | easeOutBounce: function (x, t, b, c, d) { 158 | if ((t/=d) < (1/2.75)) { 159 | return c*(7.5625*t*t) + b; 160 | } else if (t < (2/2.75)) { 161 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 162 | } else if (t < (2.5/2.75)) { 163 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 164 | } else { 165 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 166 | } 167 | }, 168 | easeInOutBounce: function (x, t, b, c, d) { 169 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 170 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 171 | } 172 | }); 173 | 174 | /* 175 | * 176 | * TERMS OF USE - EASING EQUATIONS 177 | * 178 | * Open source under the BSD License. 179 | * 180 | * Copyright © 2001 Robert Penner 181 | * All rights reserved. 182 | * 183 | * Redistribution and use in source and binary forms, with or without modification, 184 | * are permitted provided that the following conditions are met: 185 | * 186 | * Redistributions of source code must retain the above copyright notice, this list of 187 | * conditions and the following disclaimer. 188 | * Redistributions in binary form must reproduce the above copyright notice, this list 189 | * of conditions and the following disclaimer in the documentation and/or other materials 190 | * provided with the distribution. 191 | * 192 | * Neither the name of the author nor the names of contributors may be used to endorse 193 | * or promote products derived from this software without specific prior written permission. 194 | * 195 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 196 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 197 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 198 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 199 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 200 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 201 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 202 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 203 | * OF THE POSSIBILITY OF SUCH DAMAGE. 204 | * 205 | */ -------------------------------------------------------------------------------- /static/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contact us 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 32 |
33 | 34 |
35 | 36 | 39 | 40 | 41 | 53 | 54 |
55 |
56 |
57 | 58 | 59 | 60 |
61 | 62 |
63 |

contact us

64 |
65 | 66 |
67 | 68 |
69 |
70 | 71 | 72 |
73 | 74 | 114 |
115 | 153 |
154 |
155 |
156 |
157 |
158 | 159 | 200 | 201 |
202 |
203 |
204 |

Copyright © 2014.Company name All rights reserved.免费模板网

205 |
206 |
207 |
208 | 209 | 210 | -------------------------------------------------------------------------------- /static/portofolioitem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | portfolio-items 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 32 | 76 | 77 | 78 | 93 | 94 | 95 | 96 |
97 | 98 |
99 | 100 | 103 | 104 | 105 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 |
125 | 126 |
127 |

portoflio

128 |
129 | 130 |
131 | 132 |
133 |
134 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit sed do eiusmod.

135 | 138 |
139 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

140 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

141 |
142 |
143 |
144 |

recent wroks

145 |
146 |
147 |
148 |
149 | 150 | 151 |
152 |
153 |

character desing

154 | 155 |

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.

156 |
157 |
158 | 159 | 160 | 161 | 211 | 212 | 213 |
214 |
215 |
216 |
217 |
218 | 219 | 260 | 261 |
262 |
263 |
264 |

Copyright © 2014.Company name All rights reserved.免费模板网

265 |
266 |
267 |
268 | 269 | 270 | 271 | -------------------------------------------------------------------------------- /static/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About us 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | 21 | 22 | 23 | 35 | 36 |
37 |
38 |
39 | 40 | 41 | 42 |
43 | 44 |
45 |

about us

46 |
47 | 48 |
49 | 50 |
51 |
52 | 53 |
54 | 55 |
56 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

57 | 58 |
59 | 60 |  61 | 62 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

63 |
64 |
65 | 66 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

67 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

68 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

69 | 70 |
71 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

72 |
73 |
74 |
75 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

76 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

77 |
78 |
79 | 80 |
81 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

82 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

83 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

84 |
85 |
86 | 87 | 88 |
89 | 90 |
91 |
92 | 93 |
alertx
94 |
95 |
alertx
96 |
97 |
alertx
98 |
99 |
alertx
100 |
101 |
102 |
103 | 104 | 105 | 106 |
107 | 108 | 109 |
110 | 149 |
150 | 151 |
152 |
153 | 154 |
155 |
156 | 157 | 158 | 159 | 200 | 201 |
202 |
203 |
204 |

Copyright © 2014.Company name All rights reserved.免费模板网

205 |
206 |
207 |
208 | 209 | 210 | -------------------------------------------------------------------------------- /static/blog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 32 |
33 | 34 |
35 | 36 | 39 | 40 | 41 | 53 | 54 |
55 |
56 |
57 | 58 | 59 | 60 |
61 | 62 |
63 |

blog

64 |
65 | 66 |
67 | 68 |
69 |
70 | 71 |
72 | 73 |
74 | 75 |
76 |
77 | 78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |

date

93 | April 15,2012 94 |

tags

95 | Website Desings 96 |

comments

97 | 4 98 |
99 |
100 |

top wordpress themes of 2012

101 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

102 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

103 |
104 |
105 |
106 |
107 | 108 |
109 |
110 |
111 | 112 |
113 |  114 |
115 |
116 |

date

117 | April 15,2012 118 |

tags

119 | Website Desings 120 |

comments

121 | 4 122 |
123 |
124 |

top wordpress themes of 2012

125 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

126 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

127 |
128 |
129 |
130 |
131 | 132 |
133 |
134 |
135 | 136 |
137 | 138 |
139 |
140 |

date

141 | April 15,2012 142 |

tags

143 | Website Desings 144 |

comments

145 | 4 146 |
147 |
148 |

big buck bunny trailer

149 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

150 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 | 159 |
160 | 161 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.

162 |
163 |
164 |
165 |
166 |
167 | 168 |
169 |

some of the best freebies on the web

170 | www.Lorem ipsum.com 171 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.

172 |
173 |
174 | 175 |
176 | 177 | 178 |
179 | 218 |
219 |
220 |
221 | 222 | 223 |
224 |
    225 |
  • 1
  • 226 |
  • 2
  • 227 |
  • 3
  • 228 |
    229 |
230 |
231 |
232 | 233 |
234 | 235 | 236 | 237 | 278 | 279 |
280 |
281 |
282 |

Copyright © 2014.Company name All rights reserved.免费模板网

283 |
284 |
285 |
286 | 287 | 288 | -------------------------------------------------------------------------------- /static/js/jquery.mixitup.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * MIXITUP - A CSS3 & JQuery Filter and Sort Plugin 3 | * Version: 1.4.0 4 | * Author: Patrick Kunka 5 | * Copyright 2012-2013 Patrick Kunka, All Rights Reserved 6 | * FREE FOR NON-COMMERCIAL USE 7 | * http://www.mixitup.io 8 | */ 9 | (function(e){function m(d,b,h,c,a){function j(){k.unbind();b&&v(b,h,c,a);a.startOrder=[];a.newOrder=[];a.origSort=[];a.checkSort=[];u.removeStyle(a.prefix+"filter, filter, "+a.prefix+"transform, transform, opacity, display").css(a.clean).removeAttr("data-checksum");window.atob||u.css({display:"none",opacity:"0"});k.removeStyle(a.prefix+"transition, transition, "+a.prefix+"perspective, perspective, "+a.prefix+"perspective-origin, perspective-origin, "+(a.resizeContainer?"height":""));"list"==a.layoutMode? 10 | (q.css({display:a.targetDisplayList,opacity:"1"}),a.origDisplay=a.targetDisplayList):(q.css({display:a.targetDisplayGrid,opacity:"1"}),a.origDisplay=a.targetDisplayGrid);a.origLayout=a.layoutMode;setTimeout(function(){u.removeStyle(a.prefix+"transition, transition");a.mixing=!1;if("function"==typeof a.onMixEnd){var b=a.onMixEnd.call(this,a);a=b?b:a}})}clearInterval(a.failsafe);a.mixing=!0;if("function"==typeof a.onMixStart){var f=a.onMixStart.call(this,a);a=f?f:a}for(var g=a.transitionSpeed,f=0;2> 11 | f;f++){var n=0==f?n=a.prefix:"";a.transition[n+"transition"]="all "+g+"ms linear";a.transition[n+"transform"]=n+"translate3d(0,0,0)";a.perspective[n+"perspective"]=a.perspectiveDistance+"px";a.perspective[n+"perspective-origin"]=a.perspectiveOrigin}var r=a.targetSelector,u=c.find(r);u.each(function(){this.data={}});var k=u.parent();k.css(a.perspective);a.easingFallback="ease-in-out";"smooth"==a.easing&&(a.easing="cubic-bezier(0.25, 0.46, 0.45, 0.94)");"snap"==a.easing&&(a.easing="cubic-bezier(0.77, 0, 0.175, 1)"); 12 | "windback"==a.easing&&(a.easing="cubic-bezier(0.175, 0.885, 0.320, 1.275)",a.easingFallback="cubic-bezier(0.175, 0.885, 0.320, 1)");"windup"==a.easing&&(a.easing="cubic-bezier(0.6, -0.28, 0.735, 0.045)",a.easingFallback="cubic-bezier(0.6, 0.28, 0.735, 0.045)");f="list"==a.layoutMode&&null!=a.listEffects?a.listEffects:a.effects;Array.prototype.indexOf&&(a.fade=-1m.length?s=s.add(c.find(r+":visible")):u.each(function(){for(var a=0,b=e(this),c=0;cf;f++)n=0==f?n=a.prefix:"",d[n+"transform"]=a.scale+" "+a.rotateX+" "+ 18 | a.rotateY+" "+a.rotateZ,d[n+"filter"]=a.blur+" "+a.grayscale;p.css(d);l.each(function(){var b=this.data,c=e(this);c.hasClass("mix_tohide")?(b.preTX=b.origPos.left-b.hideInterPos.left,b.preTY=b.origPos.top-b.hideInterPos.top):(b.preTX=b.origPos.left-b.preInterPos.left,b.preTY=b.origPos.top-b.preInterPos.top);for(var d={},g=0;2>g;g++){var f=0==g?f=a.prefix:"";d[f+"transform"]="translate("+b.preTX+"px,"+b.preTY+"px)"}c.css(d)});"list"==a.layoutMode?(c.addClass(a.listClass),c.removeClass(a.gridClass)): 19 | (c.addClass(a.gridClass),c.removeClass(a.listClass));setTimeout(function(){if(a.resizeContainer){for(var b={},c=0;2>c;c++){var d=0==c?d=a.prefix:"";b[d+"transition"]="all "+g+"ms ease-in-out";b.height=a.newHeight+"px"}k.css(b)}t.css("opacity",a.fade);p.css("opacity",1);p.each(function(){var b=this.data;b.tX=b.finalPos.left-b.showInterPos.left;b.tY=b.finalPos.top-b.showInterPos.top;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition-property"]=f+"transform, "+f+"filter, opacity";c[f+ 20 | "transition-timing-function"]=a.easing+", linear, linear";c[f+"transition-duration"]=g+"ms";c[f+"transition-delay"]="0";c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)";c[f+"filter"]="none"}e(this).css("-webkit-transition","all "+g+"ms "+a.easingFallback).css(c)});l.each(function(){var b=this.data;b.tX=0!=b.finalPrePos.left?b.finalPrePos.left-b.preInterPos.left:0;b.tY=0!=b.finalPrePos.left?b.finalPrePos.top-b.preInterPos.top:0;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition"]= 21 | "all "+g+"ms "+a.easing;c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)"}e(this).css("-webkit-transition","all "+g+"ms "+a.easingFallback).css(c)});b={};for(c=0;2>c;c++)d=0==c?d=a.prefix:"",b[d+"transition"]="all "+g+"ms "+a.easing+", "+d+"filter "+g+"ms linear, opacity "+g+"ms linear",b[d+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[d+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;t.css(b);k.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(a){if(-1< 22 | a.originalEvent.propertyName.indexOf("transform")||-1d;d++){var e=0==d?e=a.prefix:"";b[e+"transition"]="height "+g+"ms ease-in-out"; 23 | b.height=a.minHeight+"px"}k.css(b)}u.css(a.transition);if(s.length){b={};for(d=0;2>d;d++)e=0==d?e=a.prefix:"",b[e+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[e+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;t.css(b);k.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(b){if(-11*b.attr(d).toLowerCase()?1:0}function j(a){"asc"==b?f.prepend(a).prepend(" \ 25 | "):f.append(a).append(" \ 26 | ")}h.find(c.targetSelector).wrapAll('
');var f=h.find(".mix_sorter");c.origSort.length||f.find(c.targetSelector+":visible").each(function(){e(this).wrap("");c.origSort.push(e(this).parent().html().replace(/\s+/g,""));e(this).unwrap()});f.empty();if("reset"==d)e.each(c.startOrder, 27 | function(){f.append(this).append(" \ 28 | ")});else if("default"==d)e.each(c.origOrder,function(){j(this)});else if("random"==d){if(!c.newOrder.length){for(var g=c.startOrder.slice(),n=g.length,r=n;r--;){var m=parseInt(Math.random()*n),k=g[r];g[r]=g[m];g[m]=k}c.newOrder=g}e.each(c.newOrder,function(){f.append(this).append(" \ 29 | ")})}else"custom"==d?e.each(b,function(){j(this)}):("undefined"===typeof c.origOrder[0].attr(d)&&console.log("No such attribute found. Terminating"),c.newOrder.length||(e.each(c.origOrder, 30 | function(){c.newOrder.push(e(this))}),c.newOrder.sort(a)),e.each(c.newOrder,function(){j(this)}));c.checkSort=[];f.find(c.targetSelector+":visible").each(function(a){var b=e(this);0==a&&b.attr("data-checksum","1");b.wrap("");c.checkSort.push(b.parent().html().replace(/\s+/g,""));b.unwrap()});h.find(c.targetSelector).unwrap()}var w={init:function(d){return this.each(function(){var b={targetSelector:".mix",filterSelector:".filter",sortSelector:".sort",buttonEvent:"click",effects:["fade","scale"], 31 | listEffects:null,easing:"smooth",layoutMode:"grid",targetDisplayGrid:"inline-block",targetDisplayList:"block",listClass:"",gridClass:"",transitionSpeed:600,showOnLoad:"all",multiFilter:!1,filterLogic:"or",resizeContainer:!0,minHeight:0,failClass:"fail",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",animateGridList:!0,onMixLoad:null,onMixStart:null,onMixEnd:null,container:null,origOrder:[],startOrder:[],newOrder:[],origSort:[],checkSort:[],filter:"",mixing:!1,origDisplay:"",origLayout:"",origHeight:0, 32 | newHeight:0,isTouch:!1,resetDelay:0,failsafe:null,prefix:"",easingFallback:"ease-in-out",transition:{},perspective:{},clean:{},fade:"1",scale:"",rotateX:"",rotateY:"",rotateZ:"",blur:"",grayscale:""};d&&e.extend(b,d);this.config=b;e.support.touch="ontouchend"in document;e.support.touch&&(b.isTouch=!0,b.resetDelay=350);b.container=e(this);var h=b.container,c;a:{c=h[0];for(var a=["Webkit","Moz","O","ms"],j=0;jc;c++)a=0==c?a=b.prefix:"",b.transition[a+"transition"]="all "+b.transitionSpeed+"ms ease-in-out",b.perspective[a+"perspective"]=b.perspectiveDistance+"px",b.perspective[a+"perspective-origin"]=b.perspectiveOrigin;for(c=0;2>c;c++)a=0==c?a=b.prefix:"",b.clean[a+"transition"]="none";"list"==b.layoutMode?(h.addClass(b.listClass),b.origDisplay=b.targetDisplayList):(h.addClass(b.gridClass), 34 | b.origDisplay=b.targetDisplayGrid);b.origLayout=b.layoutMode;c=b.showOnLoad.split(" ");e.each(c,function(){e(b.filterSelector+'[data-filter="'+this+'"]').addClass("active")});h.find(b.targetSelector).addClass("mix_all");"all"==c[0]&&(c[0]="mix_all",b.showOnLoad="mix_all");var f=e();e.each(c,function(){f=f.add(e("."+this))});f.each(function(){var a=e(this);"list"==b.layoutMode?a.css("display",b.targetDisplayList):a.css("display",b.targetDisplayGrid);a.css(b.transition)});setTimeout(function(){b.mixing= 35 | !0;f.css("opacity","1");setTimeout(function(){"list"==b.layoutMode?f.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayList,opacity:1}):f.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayGrid,opacity:1});b.mixing=!1;if("function"==typeof b.onMixLoad){var a=b.onMixLoad.call(this,b);b=a?a:b}},b.transitionSpeed)},10);b.filter=b.showOnLoad;e(b.sortSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this),c=a.attr("data-sort"),d=a.attr("data-order"); 36 | if(a.hasClass("active")){if("random"!=c)return!1}else e(b.sortSelector).removeClass("active"),a.addClass("active");h.find(b.targetSelector).each(function(){b.startOrder.push(e(this))});m(b.filter,c,d,h,b)}});e(b.filterSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this);if(!1==b.multiFilter)e(b.filterSelector).removeClass("active"),a.addClass("active"),b.filter=a.attr("data-filter"),e(b.filterSelector+'[data-filter="'+b.filter+'"]').addClass("active"),"all"==b.filter&&(b.filter="mix_all"); 37 | else{var c=a.attr("data-filter");"all"==c&&(c="mix_all");a.hasClass("active")?(a.removeClass("active"),b.filter=b.filter.replace(RegExp("(\\s|^)"+c),"")):(a.addClass("active"),b.filter=b.filter+" "+c)}m(b.filter,null,null,h,b)}})})},toGrid:function(){return this.each(function(){var d=this.config;"grid"!=d.layoutMode&&(d.layoutMode="grid",m(d.filter,null,null,e(this),d))})},toList:function(){return this.each(function(){var d=this.config;"list"!=d.layoutMode&&(d.layoutMode="list",m(d.filter,null,null, 38 | e(this),d))})},filter:function(d){return this.each(function(){var b=this.config;e(b.filterSelector).removeClass("active");e(b.filterSelector+'[data-filter="'+d+'"]').addClass("active");"all"==d&&(d="mix_all");b.mixing||(b.filter=d,m(d,null,null,e(this),b))})},sort:function(d){return this.each(function(){var b=this.config;if(e.isArray(d))var h=d[0],c=d[1];else h=d,c="desc";b.mixing||(e(this).find(b.targetSelector).each(function(){b.startOrder.push(e(this))}),m(b.filter,h,c,e(this),b))})}};e.fn.mixitup= 39 | function(d,b){if(w[d])return w[d].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof d||!d)return w.init.apply(this,arguments)};e.fn.removeStyle=function(d){return this.each(function(){var b=e(this);d=d.replace(/\s+/g,"");var h=d.split(",");e.each(h,function(){var c=RegExp(this.toString()+"[^;]+;?","g");b.attr("style",function(a,b){if(b)return b.replace(c,"")})})})};Array.prototype.compare=function(d){if(this.length!=d.length)return!1;for(var b=0;b 3 | 4 | 5 | portfolio 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 32 | 76 | 77 | 78 | 93 | 94 | 95 | 96 |
97 | 98 |
99 | 100 | 103 | 104 | 105 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 |
125 | 126 |
127 |

portoflio

128 |
129 | 130 |
131 | 132 |
133 |
134 | 135 |
136 | 137 |
138 |
139 |

Lorem ipsum sit amet

140 | 141 |

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.

142 |
143 |
144 | 145 | 314 |
315 | 316 | 317 |
318 |
319 | 320 |
321 | 322 | 363 | 364 |
365 |
366 |
367 |

Copyright © 2014.Company name All rights reserved.免费模板网

368 |
369 |
370 |
371 | 372 | 373 | -------------------------------------------------------------------------------- /static/js/fliplightbox.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * flipLightBox - Responsive Lightbox jQuery Plugin 3 | * version: 1.0.1 4 | * @requires jQuery v1.5 or later 5 | * 6 | * License at http://flipgallery.net/fliplightbox.html#download 7 | * 8 | * Example at http://flipgallery.net/fliplightbox.html 9 | * 10 | * Copyright 2013 flipGallery.net 11 | * 12 | */ 13 | 14 | (function( $ ){ 15 | 16 | $.fn.flipLightBox = function(flb_options) { 17 | 18 | var flb_settings = $.extend({ 19 | 20 | // FLIP MODE SETTINGS 21 | // ------------------ 22 | 23 | flip_mode: 1, 24 | 25 | // 1 = Flip On & 0 = Flip Off (fade). 26 | 27 | // VISUAL SETTINGS 28 | // --------------- 29 | 30 | lightbox_background_opacity: 0.8, 31 | 32 | lightbox_border_width: 10, // (pixels) 33 | 34 | lightbox_border_color: '#fff', 35 | 36 | lightbox_z_index: '1000', 37 | 38 | // SPEED SETTINGS 39 | // -------------- 40 | 41 | lightbox_flip_speed: 800, 42 | 43 | // Speed of complete lightbox flip or fade (milliseconds). 44 | 45 | // TEXT SETTINGS 46 | // ------------- 47 | 48 | // *Picture/Lightbox Text Settings* 49 | 50 | lightbox_text_status: 1, 51 | 52 | // 1 = On & 0 = Off. 53 | 54 | lightbox_text_style: 'font-size: 14px; line-height: 1.4; color: #000; text-align: center;', 55 | 56 | lightbox_text_background_style: 'background-color: #fff; opacity:0.8;', 57 | 58 | lightbox_text_area_position: 'bottom', 59 | 60 | // bottom or top 61 | 62 | // *Picture/Lightbox Navigation Text Settings* 63 | 64 | lightbox_navigation_status: 1, 65 | 66 | // 1 = On & 0 = Off. 67 | 68 | next_image_text: 'Next ››', 69 | 70 | back_image_text: '‹‹ Back', 71 | 72 | next_and_back_image_text_style: 'font-weight: bold; color: #000;', 73 | 74 | image_number_page: 'Image', 75 | 76 | image_number_of: 'of', 77 | 78 | image_number_text_style: 'color: #000;', 79 | 80 | // *Image Streaming Text Settings* 81 | 82 | loading_text_color: '#fff', 83 | 84 | loading_text_opacity: '0.3' 85 | 86 | }, flb_options ); 87 | 88 | var flb_loading_image="data:image/gif;base64,R0lGODlhCgARAIABAP///////yH5BAEAAAEALAAAAAAKABEAAAIWTIBpl80No5y00gdXXBjxD4biSJZGAQA7";var flb_close_image="data:image/gif;base64,R0lGODlhMgAyAIABAP///////yH5BAEAAAEALAAAAAAyADIAAALPjI+py+0Po5y0HoCz3rx7/HziKDbkiWZLyp5Kd7VcvL01ImvJvOu2vPLhVAxgkTgEmVIOIQ0QcjWRT+i0dFUmqUFP1GmAZcE/sndsXfK2N3X6KGa3j5BPOW4JjO54ConfJ/HXMygoJWcXwUR46FZYtffVGIZiOKl3iXaGuDZx+egXyclVIQpJ1iPZSRnIqGrWKveqdTr71gWLOnrLd2erW1X2O4cr7GhqvHUMqszIi2mUDOnc4kudljO3Cp3djdsdfQ3OvDu+nYeerr7Ojl4AADs=";var flb_blank_image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=";var flb_image_innit_width;var flb_box_sizing='box-sizing: content-box; -moz-box-sizing: content-box; -webkit-box-sizing: content-box;';var flb_distance_from_top;var flb_new_height;var flb_new_width;var flb_placement;var flb_i;var flb_total_lightbox_width;var flb_loading;var flb_in_img;var flb_image_name;var flb_class;var flb_textcontent;var flb_lightbox_data;var flb_total_images;var fgi_lb_name='flipLightBox';var fgi_lb_ind_name;var flb_classnum=1;var flb_itemnum;var flb_clickclass;var flb_classamount=new Array();function flb_find(){if(flb_classnum==1){fgi_lb_ind_name=fgi_lb_name}else{fgi_lb_ind_name=fgi_lb_name;fgi_lb_ind_name+=flb_classnum}if($('.'+fgi_lb_ind_name)[0]){$('.'+fgi_lb_ind_name+' span').hide();flb_itemnum=0;$('.'+fgi_lb_ind_name).each(function(){flb_itemnum=flb_itemnum+1;$(this).attr('class',fgi_lb_ind_name+'-'+flb_itemnum);if(flb_clickclass==null){flb_clickclass='.'+fgi_lb_ind_name+'-'+flb_itemnum}else{flb_clickclass+=', .'+fgi_lb_ind_name+'-'+flb_itemnum}});flb_classamount[fgi_lb_ind_name]=flb_itemnum;flb_classnum++;flb_find()}}flb_find();$(this).append('
');$("#flb-lightbox, #flb-lightbox-content, #flb-lightbox-text").hide();function flb_get_image_width(a){var b=new Image();b.src=a;return b.width}function flb_get_image_height(a){var b=new Image();b.src=a;return b.height}function flb_iphone_check(){return((navigator.platform.indexOf("iPhone")!=-1)||(navigator.platform.indexOf("iPod")!=-1))}function flb_load_animation(){$("#flb-load").html('
').show();setTimeout(function(){$("#flb-loading-img").html('
Loading Image')},500);setTimeout(function(){$("#flb-loading-img").prepend(' ')},1000);setTimeout(function(){$("#flb-loading-img").prepend(' ')},1500);setTimeout(function(){$("#flb-loading-img").prepend(' ')},2000);setTimeout(function(){$("#flb-loading-img").fadeOut(500)},2500);flb_loading=setTimeout(function(){flb_load_animation()},3000)}$(flb_clickclass).click(function(e){e.preventDefault();flb_image_name=$(this).attr('href');flb_class=$(this).attr('class');flb_textcontent=$('.'+flb_class+' span').html();flb_lightbox_data=flb_class.split('-');flb_total_images=flb_classamount[flb_lightbox_data[0]];$("#flb-lightbox-text").html('');if(flb_textcontent!=null&&flb_textcontent!=''&&flb_settings.lightbox_text_status==1){if(flb_settings.lightbox_navigation_status==1&&flb_total_images>1){$("#flb-lightbox-text").append('

')}$("#flb-lightbox-text").append(flb_textcontent)}$("#flb-lightbox").fadeIn(flb_settings.lightbox_flip_speed/2);flb_load_animation();flb_in_img=document.createElement('img');$("").attr('src',flb_image_name).load(function(){flb_in_img.onload=function(){$("#flb-load").html('');clearTimeout(flb_loading);$("#flb-lightbox-content").html('');if(navigator.userAgent.match('CriOS')){flb_new_width=flb_image_width=flb_in_img.width;flb_new_height=flb_image_height=flb_in_img.height}else{flb_new_width=flb_image_width=flb_get_image_width(flb_image_name);flb_new_height=flb_image_height=flb_get_image_height(flb_image_name)}if((flb_settings.lightbox_navigation_status!=1&&flb_settings.lightbox_text_status!=1)||(flb_settings.lightbox_navigation_status!=1&&(flb_textcontent==null||flb_textcontent==''))||(flb_total_images<=1&&(flb_textcontent==null||flb_textcontent==''))||(flb_total_images<=1&&flb_settings.lightbox_text_status!=1)){$("#flb-lightbox-text").css('visibility','hidden');flb_h=50}else{$("#flb-lightbox-text").css('visibility','visible');flb_h=70}$("#flb-lightbox-content").hide();setTimeout(function(){$(window).resize();$("#flb-lightbox-image").attr('src',flb_image_name).css({width:flb_image_innit_width,height:flb_new_height,opacity:0});setTimeout(function(){if($("#flb-lightbox-text").is(':hidden')){if(navigator.userAgent.match(/iPad/i)||flb_iphone_check()){$("#flb-lightbox-text").show()}else{$("#flb-lightbox-text").slideToggle()}}},flb_settings.lightbox_flip_speed);window.setTimeout(function(){$("#flb-lightbox-content").show();$("#flb-lightbox-image").attr('src',flb_image_name).animate({width:flb_new_width,height:flb_new_height,opacity:1},{duration:flb_settings.lightbox_flip_speed/2})},flb_settings.lightbox_flip_speed/2);flb_distance_from_top=flb_new_height+(flb_settings.lightbox_border_width*2)+25;flb_distance_from_top=($(window).height()-flb_distance_from_top)/2-(($('#flb-lightbox-text').height()/2)+20)+flb_placement;if(flb_distance_from_top<0){flb_distance_from_top=10}$("#flb-lightbox-content").prepend('Close
');$("#flb-close").click(function(){$(document).unbind("keyup",flb_escape);$("#flb-close, #flb-next-pic, #flb-back-pic").unbind("click");$("#flb-close").attr('src',flb_blank_image);$("#flb-lightbox-image").attr('src',flb_image_name).animate({width:flb_image_innit_width,opacity:0},{duration:flb_settings.lightbox_flip_speed/2});setTimeout(function(){$("#flb-lightbox").fadeOut(500);if($("#flb-lightbox-text").is(':visible')){if(navigator.userAgent.match(/iPad/i)||flb_iphone_check()){$("#flb-lightbox-text").fadeOut()}else{$("#flb-lightbox-text").slideToggle()}}},flb_settings.lightbox_flip_speed/2)});window.setTimeout(function(){$("#flb-close").attr('src',flb_close_image);clearTimeout(flb_loading)},flb_settings.lightbox_flip_speed);if(flb_settings.lightbox_navigation_status==1&&flb_total_images>1){if(flb_lightbox_data[1]'+flb_settings.next_image_text+'');$("#flb-next-pic").click(function(e){$(document).unbind("keyup",flb_escape);$("#flb-close, #flb-next-pic, #flb-back-pic").unbind("click");if($("#flb-lightbox-text").is(':visible')){if(navigator.userAgent.match(/iPad/i)||flb_iphone_check()){$("#flb-lightbox-text").fadeOut()}else{$("#flb-lightbox-text").slideToggle()}}e.preventDefault();setTimeout(function(){$('.'+flb_lightbox_data[0]+'-'+(Math.floor(flb_lightbox_data[1])+1)).trigger('click')},flb_settings.lightbox_flip_speed/2);$("#flb-close").attr('src',flb_blank_image);$("#flb-lightbox-image").attr('src',flb_image_name).animate({width:flb_image_innit_width,opacity:0},{duration:flb_settings.lightbox_flip_speed/2})})}$("#flb-lightbox-text").prepend(' '+flb_settings.image_number_page+' '+flb_lightbox_data[1]+' '+flb_settings.image_number_of+' '+flb_total_images+' ');if(flb_lightbox_data[1]>1){$("#flb-lightbox-text").prepend(''+flb_settings.back_image_text+'');$("#flb-back-pic").click(function(e){$(document).unbind("keyup",flb_escape);$("#flb-close, #flb-next-pic, #flb-back-pic").unbind("click");if($("#flb-lightbox-text").is(':visible')){if(navigator.userAgent.match(/iPad/i)||flb_iphone_check()){$("#flb-lightbox-text").fadeOut()}else{$("#flb-lightbox-text").slideToggle()}}e.preventDefault();setTimeout(function(){$('.'+flb_lightbox_data[0]+'-'+(Math.floor(flb_lightbox_data[1])-1)).trigger('click')},flb_settings.lightbox_flip_speed/2);$("#flb-close").attr('src',flb_blank_image);$("#flb-lightbox-image").attr('src',flb_image_name).animate({width:flb_image_innit_width,opacity:0},{duration:flb_settings.lightbox_flip_speed/2})})}}function flb_escape(e){if(e.keyCode==27){$('#flb-close').trigger('click')}}$(document).keyup(flb_escape)},100)};flb_in_img.src=flb_image_name}).error(function(){$("#flb-load").html('');clearTimeout(flb_loading);setTimeout(function(){clearTimeout(flb_loading)},3000);$("#flb-lightbox").fadeOut(500);$("#flb-lightbox-content, #flb-lightbox-text").html('');$("#flb-lightbox-text").hide()})});$(window).resize(function(){flb_i=1;if($(window).height()<(flb_image_height+$('#flb-lightbox-text').height()+flb_h)+(flb_settings.lightbox_border_width*2)){flb_new_height=$(window).height()-(flb_settings.lightbox_border_width*2)-$('#flb-lightbox-text').height()-flb_h;flb_new_width=flb_image_width/flb_image_height*flb_new_height;flb_i=0}if($(window).width()<(flb_image_width+60)+(flb_settings.lightbox_border_width*2)&&($(window).width()-flb_image_width)<($(window).height()-flb_image_height-($('#flb-lightbox-text').height()+flb_h))){flb_new_width=$(window).width()-(flb_settings.lightbox_border_width*2)-60;flb_new_height=flb_image_height/flb_image_width*flb_new_width;flb_i=0}if(flb_i==1){flb_new_width=flb_image_width;flb_new_height=flb_image_height}if(flb_settings.lightbox_text_area_position=='top'&&flb_h==70){flb_placement=(($('#flb-lightbox-text').height()/2)+15)*2}else{flb_placement=0}$("#flb-lightbox-image").css({width:flb_new_width,height:flb_new_height});flb_distance_from_top=flb_new_height+(flb_settings.lightbox_border_width*2)+25;flb_distance_from_top=($(window).height()-flb_distance_from_top)/2-(($('#flb-lightbox-text').height()/2)+20)+flb_placement;if(flb_distance_from_top<0){flb_distance_from_top=10}$("#flb-close").css({'margin-top':flb_distance_from_top,'margin-left':($(window).width()-85)+(flb_settings.lightbox_border_width*2)+(($('#flb-lightbox-text').height()/2)+20)-flb_placement});flb_total_lightbox_width=(flb_new_width+25)+(flb_settings.lightbox_border_width*2);$("#flb-close").attr('style','margin-top: '+flb_distance_from_top+'px; margin-left: '+flb_total_lightbox_width+'px; '+flb_box_sizing+'');if(flb_settings.flip_mode==0){flb_image_innit_width=flb_new_width}else{flb_image_innit_width=0}})} 89 | 90 | })( jQuery ); 91 | -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | html5橘红色网页模版jetro 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 32 | 76 | 77 | 78 | 93 | 94 | 95 | 96 | 97 | 98 |
99 | 100 |
101 | 102 | 105 | 106 | 107 | 119 |
120 | 121 | 122 |
123 |
124 | 125 | 126 | 127 | 128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |

slider one

137 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

138 |
139 |
140 |
141 |
142 |

slider two

143 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

144 |
145 |
146 | 152 |
153 |
154 |

slider four

155 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

156 |
157 |
158 |
159 |
160 |

slider ofive

161 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

162 |
163 |
164 |
165 |
166 |

slider six

167 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

168 |
169 |
170 | 171 |
172 |
173 |
174 |
175 |
176 | 177 | 178 | 179 |
180 |
181 |
182 |
183 |
184 |  185 |

check out my lastest portfolio items

186 |
187 |
188 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

189 | More 190 |
191 |
192 |
193 |  194 |

check out my lastest portfolio items

195 |
196 |
197 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

198 | More 199 |
200 |
201 |
202 |  203 |

check out my lastest portfolio items

204 |
205 |
206 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

207 | More 208 |
209 |
210 |
211 | 212 |
213 |

recent wroks

214 |
215 |
216 |
217 | 218 | 219 | 220 | 221 | 222 |
223 | 224 | 225 |
226 |
227 |

character desing

228 |  229 |

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

230 |
231 |
232 | 233 | 234 | 284 | 285 | 286 |
287 |
288 | 289 |
290 |
291 | 292 | 293 | 334 | 335 |
336 |
337 |
338 |

Copyright © 2014.Company name All rights reserved.免费模板网

339 |
340 |
341 |
342 |
343 | 344 | 345 | -------------------------------------------------------------------------------- /.idea/libraries/Arquillian_JUnit_Release.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /static/js/jquery.mobile.customized.min.js: -------------------------------------------------------------------------------- 1 | // jQuery Mobile framework customized for Camera slideshow, made by 2 | // 'jquery.mobile.define.js', 3 | // 'jquery.ui.widget.js', 4 | // 'jquery.mobile.widget.js', 5 | // 'jquery.mobile.media.js', 6 | // 'jquery.mobile.support.js', 7 | // 'jquery.mobile.vmouse.js', 8 | // 'jquery.mobile.event.js', 9 | // 'jquery.mobile.core.js' 10 | window.define=function(){Array.prototype.slice.call(arguments).pop()(window.jQuery)};define(["jquery"],function(a){(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++){a(e).triggerHandler("remove")}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){if(!c){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1];f=e+"-"+b;if(!d){d=c;c=a.Widget}a.expr[":"][f]=function(c){return!!a.data(c,b)};a[e]=a[e]||{};a[e][b]=function(a,b){if(arguments.length){this._createWidget(a,b)}};var g=new c;g.options=a.extend(true,{},g.options);a[e][b].prototype=a.extend(true,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d);a.widget.bridge(b,a[e][b])};a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e==="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[true,e].concat(g)):e;if(f&&e.charAt(0)==="_"){return h}if(f){this.each(function(){var d=a.data(this,c);if(!d){throw"cannot call methods on "+c+" prior to initialization; "+"attempted to call method '"+e+"'"}if(!a.isFunction(d[e])){throw"no such method '"+e+"' for "+c+" widget instance"}var f=d[e].apply(d,g);if(f!==d&&f!==b){h=f;return false}})}else{this.each(function(){var b=a.data(this,c);if(b){b.option(e||{})._init()}else{a.data(this,c,new d(e,this))}})}return h}};a.Widget=function(a,b){if(arguments.length){this._createWidget(a,b)}};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata){b=a.metadata.get(element)[this.widgetName]}return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0){return a.extend({},this.options)}if(typeof c==="string"){if(d===b){return this.options[c]}e={};e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;if(a==="disabled"){this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();d=d||{};if(c.originalEvent){for(var f=a.event.props.length,g;f;){g=a.event.props[--f];c[g]=c.originalEvent[g]}}this.element.trigger(c,d);return!(a.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery)});define(["jquery","./jquery.ui.widget"],function(a){(function(a,b){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var c=this.element,d={};a.each(this.options,function(a){var e=c.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));if(e!==b){d[a]=e}});return d},enhanceWithin:function(b){var c=a.mobile.closestPageData(a(b)),d=c&&c.keepNativeSelector()||"";a(this.options.initSelector,b).not(d)[this.widgetName]()}})})(jQuery)});define(["jquery","./jquery.mobile.core"],function(a){(function(a,b){var c=a(window),d=a("html");a.mobile.media=function(){var b={},c=a("
"),e=a("").append(c);return function(a){if(!(a in b)){var f=document.createElement("style"),g="@media "+a+" { #jquery-mediatest { position:absolute; } }";f.type="text/css";if(f.styleSheet){f.styleSheet.cssText=g}else{f.appendChild(document.createTextNode(g))}d.prepend(e).prepend(f);b[a]=c.css("position")==="absolute";e.add(f).remove()}return b[a]}}()})(jQuery)});define(["jquery","./jquery.mobile.media"],function(a){(function(a,b){function m(){var b=location.protocol+"//"+location.host+location.pathname+"ui-dir/",d=a("head base"),e=null,f="",g,h;if(!d.length){d=e=a("",{href:b}).appendTo("head")}else{f=d.attr("href")}g=a("").prependTo(c);h=g[0].href;d[0].href=f||location.pathname;if(e){e.remove()}return h.indexOf(b)===0}function l(){var b="transform-3d";return k("perspective","10px","moz")||a.mobile.media("(-"+e.join("-"+b+"),(-")+"-"+b+"),("+b+")")}function k(a,b,c){var d=document.createElement("div"),f=function(a){return a.charAt(0).toUpperCase()+a.substr(1)},g=function(a){return"-"+a.charAt(0).toLowerCase()+a.substr(1)+"-"},h=function(c){var e=g(c)+a+": "+b+";",h=f(c),i=h+f(a);d.setAttribute("style",e);if(!!d.style[i]){k=true}},j=c?[c]:e,k;for(i=0;i").prependTo("html"),d=c[0].style,e=["Webkit","Moz","O"],f="palmGetResource"in window,g=window.operamini&&{}.toString.call(window.operamini)==="[object OperaMini]",h=window.blackberry;a.extend(a.mobile,{browser:{}});a.mobile.browser.ie=function(){var a=3,b=document.createElement("div"),c=b.all||[];while(b.innerHTML="",c[0]){}return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in window&&"onorientationchange"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window||k("transition","height 100ms linear"),pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!j("content"),touchOverflow:!!j("overflowScrolling"),cssTransform3d:l(),boxShadow:!!j("boxShadow")&&!h,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in c[0])&&!f&&!g,dynamicBaseTag:m()});c.remove();var n=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint||g||n;if(n){a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")})}if(!a.support.boxShadow){a("html").addClass("ui-mobile-nosupport-boxshadow")}})(jQuery)});define(["jquery"],function(a){(function(a,b,c,d){function O(b){var c=b.substr(1);return{setup:function(d,f){if(!M(this)){a.data(this,e,{})}var g=a.data(this,e);g[b]=true;k[b]=(k[b]||0)+1;if(k[b]===1){t.bind(c,H)}a(this).bind(c,N);if(s){k["touchstart"]=(k["touchstart"]||0)+1;if(k["touchstart"]===1){t.bind("touchstart",I).bind("touchend",L).bind("touchmove",K).bind("scroll",J)}}},teardown:function(d,f){--k[b];if(!k[b]){t.unbind(c,H)}if(s){--k["touchstart"];if(!k["touchstart"]){t.unbind("touchstart",I).unbind("touchmove",K).unbind("touchend",L).unbind("scroll",J)}}var g=a(this),h=a.data(this,e);if(h){h[b]=false}g.unbind(c,N);if(!M(this)){g.removeData(e)}}}}function N(){}function M(b){var c=a.data(b,e),d;if(c){for(d in c){if(c[d]){return true}}}return false}function L(a){if(r){return}B();var b=y(a.target),c;G("vmouseup",a,b);if(!o){var d=G("vclick",a,b);if(d&&d.isDefaultPrevented()){c=w(a).changedTouches[0];p.push({touchID:v,x:c.clientX,y:c.clientY});q=true}}G("vmouseout",a,b);o=false;E()}function K(b){if(r){return}var c=w(b).touches[0],d=o,e=a.vmouse.moveDistanceThreshold;o=o||Math.abs(c.pageX-m)>e||Math.abs(c.pageY-n)>e,flags=y(b.target);if(o&&!d){G("vmousecancel",b,flags)}G("vmousemove",b,flags);E()}function J(a){if(r){return}if(!o){G("vmousecancel",a,y(a.target))}o=true;E()}function I(b){var c=w(b).touches,d,e;if(c&&c.length===1){d=b.target;e=y(d);if(e.hasVirtualBinding){v=u++;a.data(d,f,v);F();D();o=false;var g=w(b).touches[0];m=g.pageX;n=g.pageY;G("vmouseover",b,e);G("vmousedown",b,e)}}}function H(b){var c=a.data(b.target,f);if(!q&&(!v||v!==c)){var d=G("v"+b.type,b);if(d){if(d.isDefaultPrevented()){b.preventDefault()}if(d.isPropagationStopped()){b.stopPropagation()}if(d.isImmediatePropagationStopped()){b.stopImmediatePropagation()}}}}function G(b,c,d){var e;if(d&&d[b]||!d&&z(c.target,b)){e=x(c,b);a(c.target).trigger(e)}return e}function F(){if(l){clearTimeout(l);l=0}}function E(){F();l=setTimeout(function(){l=0;C()},a.vmouse.resetTimerDuration)}function D(){A()}function C(){v=0;p.length=0;q=false;B()}function B(){r=true}function A(){r=false}function z(b,c){var d;while(b){d=a.data(b,e);if(d&&(!c||d[c])){return b}b=b.parentNode}return null}function y(b){var c={},d,f;while(b){d=a.data(b,e);for(f in d){if(d[f]){c[f]=c.hasVirtualBinding=true}}b=b.parentNode}return c}function x(b,c){var e=b.type,f,g,i,k,l,m,n,o;b=a.Event(b);b.type=c;f=b.originalEvent;g=a.event.props;if(e.search(/mouse/)>-1){g=j}if(f){for(n=g.length,k;n;){k=g[--n];b[k]=f[k]}}if(e.search(/mouse(down|up)|click/)>-1&&!b.which){b.which=1}if(e.search(/^touch/)!==-1){i=w(f);e=i.touches;l=i.changedTouches;m=e&&e.length?e[0]:l&&l.length?l[0]:d;if(m){for(o=0,len=h.length;oa.event.special.swipe.scrollSupressionThreshold){b.preventDefault()}}var e=b.originalEvent.touches?b.originalEvent.touches[0]:b,f={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(b.target)},i;d.bind(h,j).one(g,function(b){d.unbind(h,j);if(f&&i){if(i.time-f.timea.event.special.swipe.horizontalDistanceThreshold&&Math.abs(f.coords[1]-i.coords[1])i.coords[0]?"swipeleft":"swiperight")}}f=i=c})})}};(function(a,b){function j(){var a=e();if(a!==f){f=a;c.trigger("orientationchange")}}var c=a(b),d,e,f,g,h,i={0:true,180:true};if(a.support.orientation){g=a.mobile.media("all and (orientation: landscape)");h=i[b.orientation];if(g&&h||!g&&!h){i={"-90":true,90:true}}}a.event.special.orientationchange=d={setup:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled){return false}f=e();c.bind("throttledresize",j)},teardown:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled){return false}c.unbind("throttledresize",j)},add:function(a){var b=a.handler;a.handler=function(a){a.orientation=e();return b.apply(this,arguments)}}};a.event.special.orientationchange.orientation=e=function(){var c=true,d=document.documentElement;if(a.support.orientation){c=i[b.orientation]}else{c=d&&d.clientWidth/d.clientHeight<1.1}return c?"portrait":"landscape"}})(jQuery,b);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var b=250,c=function(){f=(new Date).getTime();g=f-d;if(g>=b){d=f;a(this).trigger("throttledresize")}else{if(e){clearTimeout(e)}e=setTimeout(c,b-g)}},d=0,e,f,g})();a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})})(jQuery,this)});define(["jquery","../external/requirejs/text!../version.txt","./jquery.mobile.widget"],function(a,b){(function(a,c,d){var e={};a.mobile=a.extend({},{version:b,ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:true,hashListeningEnabled:true,linkBindingEnabled:true,defaultPageTransition:"fade",maxTransitionWidth:false,minScrollBack:10,touchOverflowEnabled:false,defaultDialogTransition:"pop",loadingMessage:"loading",pageLoadErrorMessage:"Error Loading Page",loadingMessageTextVisible:false,loadingMessageTheme:"a",pageLoadErrorMessageTheme:"e",autoInitializePage:true,pushStateEnabled:true,orientationChangeEnabled:true,gradeA:function(){return a.support.mediaquery||a.mobile.browser.ie&&a.mobile.browser.ie>=7},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(b){if(a.type(b)!=="number"){b=a.mobile.defaultHomeScroll}a.event.special.scrollstart.enabled=false;setTimeout(function(){c.scrollTo(0,b);a(document).trigger("silentscroll",{x:0,y:b})},20);setTimeout(function(){a.event.special.scrollstart.enabled=true},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b){return}return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body)-([a-z])\b/,f,g;while(c){var f=c.className||"";if((g=e.exec(f))&&(d=g[2])){break}c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")}},a.mobile);a.fn.jqmData=function(b,c){var d;if(typeof b!="undefined"){d=this.data(b?a.mobile.nsNormalize(b):b,c)}return d};a.jqmData=function(b,c,d){var e;if(typeof c!="undefined"){e=a.data(b,c?a.mobile.nsNormalize(c):c,d)}return e};a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))};a.jqmRemoveData=function(b,c){return a.removeData(b,a.mobile.nsNormalize(c))};a.fn.removeWithDependents=function(){a.removeWithDependents(this)};a.removeWithDependents=function(b){var c=a(b);(c.jqmData("dependents")||a()).remove();c.remove()};a.fn.addDependents=function(b){a.addDependents(a(this),b)};a.addDependents=function(b,c){var d=a(b).jqmData("dependents")||a();a(b).jqmData("dependents",a.merge(d,c))};a.fn.getEncodedText=function(){return a("
").text(a(this).text()).html()};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]");return f.call(this,b,c,d,e)};a.extend(a.find,f);a.find.matches=function(b,c){return a.find(b,null,null,c)};a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}})(jQuery,this)}) --------------------------------------------------------------------------------