Showing
2 changed files
with
68 additions
and
3 deletions
... | @@ -2,6 +2,12 @@ var http = require('http'); | ... | @@ -2,6 +2,12 @@ var http = require('http'); |
2 | var fs = require('fs'); | 2 | var fs = require('fs'); |
3 | var express=require('express'); | 3 | var express=require('express'); |
4 | var app=express(); | 4 | var app=express(); |
5 | +var jsdom = require('jsdom'); | ||
6 | +var $ = require('jquery'); | ||
7 | +const path=require('path'); | ||
8 | + | ||
9 | +app.use(express.static('public')); | ||
10 | +app.use('/node_modules', express.static(path.join(__dirname,'/node_modules'))); | ||
5 | 11 | ||
6 | app.get('/', function(req,res){ | 12 | app.get('/', function(req,res){ |
7 | fs.readFile('index.html',function(err,data){ | 13 | fs.readFile('index.html',function(err,data){ | ... | ... |
1 | -<!DOCTYPE html> | 1 | +<!DOCTYPE html> |
2 | <html lang="ko-kr"> | 2 | <html lang="ko-kr"> |
3 | <head> | 3 | <head> |
4 | + <style> | ||
5 | + .menu a{cursor:pointer;} | ||
6 | + .menu .hide{display:none;} | ||
7 | + body{ | ||
8 | + background-color: black; | ||
9 | + backgound-repeat: no-repeat; | ||
10 | + backgound-size: cover; | ||
11 | + } | ||
12 | + </style> | ||
4 | <meta charset="utf-8"> | 13 | <meta charset="utf-8"> |
5 | <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" media="screen"> | 14 | <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" media="screen"> |
6 | <link href="/static/core/style.css" rel="stylesheet" media="screen"> | 15 | <link href="/static/core/style.css" rel="stylesheet" media="screen"> |
16 | + <script type="text/javascript" src="node_modules/jquery/dist/jquery.js"></script> | ||
17 | + <script type="text/javascript"> | ||
18 | + $().ready(function(){ | ||
19 | + alert("jquery is running"); | ||
20 | + }); | ||
21 | + </script> | ||
7 | <script async="" src="//www.google-analytics.com/analytics.js"></script> | 22 | <script async="" src="//www.google-analytics.com/analytics.js"></script> |
8 | <script type="text/javascript" async="" src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js"></script> | 23 | <script type="text/javascript" async="" src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js"></script> |
9 | <title>StarCraft 2 Build Recommendation Project</title> | 24 | <title>StarCraft 2 Build Recommendation Project</title> |
10 | -<body> | 25 | + <script> |
26 | + $(document).ready(function(){ | ||
27 | + $(".menu>a").click(function(){ | ||
28 | + var submenu = $(this).next("ul"); | ||
29 | + if( submenu.is(":visible") ){ | ||
30 | + submenu.slideUp(); | ||
31 | + }else{ | ||
32 | + submenu.slideDown(); | ||
33 | + } | ||
34 | + }); | ||
35 | + }); | ||
36 | + </script> | ||
11 | 37 | ||
38 | +<body> | ||
12 | <p stype="fond-family:verdana;">StarCraft 2 Build Recommendation Project</p> | 39 | <p stype="fond-family:verdana;">StarCraft 2 Build Recommendation Project</p> |
13 | -<img src="/imgs" alt="StarCraft2 LOGO image"> | ||
14 | <br> | 40 | <br> |
15 | <br> | 41 | <br> |
42 | +<img src="/imgs" alt="StarCraft2 LOGO image"> | ||
16 | <div class="col-md-3"> | 43 | <div class="col-md-3"> |
17 | <form id="searchform" action method="get"> | 44 | <form id="searchform" action method="get"> |
45 | + <div id="div_id_myRace" class="form-group"> | ||
46 | + <label for="id_myRace" class="control-label "> | ||
47 | + 내 종족 | ||
48 | + </label> | ||
49 | + <div class="controls"> | ||
50 | + <select class="select form-control" id="id_myRace" name="myRace"> | ||
51 | + <option value="t">테란</option> | ||
52 | + <option value="r">저그</option> | ||
53 | + <option value="a">프로토스</option> | ||
54 | + </select> | ||
55 | + </div> | ||
56 | + </div> | ||
18 | <div id="div_id_name" class="form-group"> | 57 | <div id="div_id_name" class="form-group"> |
19 | <label for="id_name" class="control-label "> | 58 | <label for="id_name" class="control-label "> |
20 | 유저 이름 | 59 | 유저 이름 |
... | @@ -77,6 +116,26 @@ | ... | @@ -77,6 +116,26 @@ |
77 | </select> | 116 | </select> |
78 | </div> | 117 | </div> |
79 | </div> | 118 | </div> |
119 | + <div> | ||
120 | + <ul> | ||
121 | + <li class="menu1"> | ||
122 | + <a>img src="" alt="메뉴이미지1"/></a> | ||
123 | + <ul class="hide"> | ||
124 | + <li>리스트1-1</li> | ||
125 | + <li>리스트1-2></li> | ||
126 | + <li>리스트1-3></li> | ||
127 | + </ul> | ||
128 | + </li> | ||
129 | + <li class="menu2"> | ||
130 | + <a>img src="" alt="메뉴이미지2"/></a> | ||
131 | + <ul class="hide"> | ||
132 | + <li>리스트2-1</li> | ||
133 | + <li>리스트2-2></li> | ||
134 | + <li>리스트2-3></li> | ||
135 | + </ul> | ||
136 | + </li> | ||
137 | + </ul> | ||
138 | + </div> | ||
80 | 139 | ||
81 | <a class="btn btn-primary" href="/build/create/">빌드</a> | 140 | <a class="btn btn-primary" href="/build/create/">빌드</a> |
82 | <br> | 141 | <br> | ... | ... |
-
Please register or login to post a comment