First steps for challenge 2
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
ul > li{margin-right:25px;font-weight:lighter;cursor:pointer}
|
||||
li.active{border-bottom:3px solid silver;}
|
||||
|
||||
.item-photo{display:flex;justify-content:center;align-items:center;border-right:1px solid #f6f6f6;}
|
||||
.menu-items{list-style-type:none;font-size:11px;display:inline-flex;margin-bottom:0px;margin-top:20px}
|
||||
.btn-success{width:100%;border-radius:0px;}
|
||||
.section{width:100%;margin-left:-15px;padding:2px;padding-left:15px;padding-right:15px;background:#f8f9f9}
|
||||
.title-price{margin-top:30px;margin-bottom:0px;color:black}
|
||||
.title-attr{margin-top:0px;margin-bottom:0px;color:black;}
|
||||
.btn-minus{cursor:pointer;font-size:7px;display:flex;align-items:center;padding:5px;padding-left:10px;padding-right:10px;border:1px solid gray;border-radius:2px;border-right:0px;}
|
||||
.btn-plus{cursor:pointer;font-size:7px;display:flex;align-items:center;padding:5px;padding-left:10px;padding-right:10px;border:1px solid gray;border-radius:2px;border-left:0px;}
|
||||
div.section > div {width:100%;display:inline-flex;}
|
||||
div.section > div > input {margin:0px;padding-left:5px;font-size:10px;padding-right:5px;max-width:18%;text-align:center;}
|
||||
.attr,.attr2{cursor:pointer;margin-right:5px;height:20px;font-size:10px;padding:2px;border:1px solid gray;border-radius:2px;}
|
||||
.attr.active,.attr2.active{ border:1px solid orange;}
|
||||
|
||||
@media (max-width: 426px) {
|
||||
.container {margin-top:0px !important;}
|
||||
.container > .row{padding:0px !important;}
|
||||
.container > .row > .col-xs-12.col-sm-5{
|
||||
padding-right:0px ;
|
||||
}
|
||||
.container > .row > .col-xs-12.col-sm-9 > div > p{
|
||||
padding-left:0px !important;
|
||||
padding-right:0px !important;
|
||||
}
|
||||
.container > .row > .col-xs-12.col-sm-9 > div > ul{
|
||||
padding-left:10px !important;
|
||||
|
||||
}
|
||||
.section{width:104%;}
|
||||
.menu-items{padding-left:0px;}
|
||||
}
|
@ -36,11 +36,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-inline" method="POST" name="form" action="/WebGoat/challenge/flag">
|
||||
<form class="form-inline" method="POST" name="form" action="/WebGoat/challenge/flag">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-flag-checkered" aria-hidden="true" style="font-size:20px"></i></div>
|
||||
<input type="text" class="form-control" id="flagInput" placeholder="a7179f89-906b-4fec-9d99-f15b796e7208"/>
|
||||
<div class="input-group-addon"><i class="fa fa-flag-checkered" aria-hidden="true"
|
||||
style="font-size:20px"></i></div>
|
||||
<input type="text" class="form-control" id="flagInput1"
|
||||
placeholder="a7179f89-906b-4fec-9d99-f15b796e7208"/>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit flag</button>
|
||||
@ -49,7 +51,90 @@
|
||||
<br/>
|
||||
<div class="attack-feedback"></div>
|
||||
<div class="attack-output"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="lesson-page-wrapper">
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/lesson_css/challenge2.css}"/>
|
||||
<script th:src="@{/lesson_js/challenge2.js}" language="JavaScript"></script>
|
||||
<div class="attack-container">
|
||||
<div class="assignment-success"><i class="fa fa-2 fa-check hidden" aria-hidden="true"></i></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3 item-photo">
|
||||
<img style="max-width:100%;" th:src="@{/images/samsung-black.jpg}"/>
|
||||
</div>
|
||||
<div class="col-xs-5" style="border:0px solid gray">
|
||||
<h3>Samsung Galaxy S8 Plus 64GB Android Phone</h3>
|
||||
<h5 style="color:#337ab7">Manufacturer <a href="http://www.samsung.com">Samsung</a> ·
|
||||
<small style="color:#337ab7">(5054 reviews)</small>
|
||||
</h5>
|
||||
|
||||
<h6 class="title-price">
|
||||
<small>PRICE</small>
|
||||
</h6>
|
||||
<h3 style="margin-top:0px;">US $899</h3>
|
||||
|
||||
<div class="section">
|
||||
<h6 class="title-attr" style="margin-top:15px;">
|
||||
<small>COLOR</small>
|
||||
</h6>
|
||||
<div>
|
||||
<div class="attr" style="width:25px;background:#5a5a5a;"></div>
|
||||
<div class="attr" style="width:25px;background:white;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" style="padding-bottom:5px;">
|
||||
<h6 class="title-attr">
|
||||
<small>CAPACITY</small>
|
||||
</h6>
|
||||
<div>
|
||||
<div class="attr2">16 GB</div>
|
||||
<div class="attr2">32 GB</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" style="padding-bottom:20px;">
|
||||
<h6 class="title-attr">
|
||||
<small>QUANTITY</small>
|
||||
</h6>
|
||||
<div>
|
||||
<div class="btn-minus"><span class="glyphicon glyphicon-minus"></span></div>
|
||||
<input value="1"/>
|
||||
<div class="btn-plus"><span class="glyphicon glyphicon-plus"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section" style="padding-bottom:20px;">
|
||||
<button class="btn btn-success"><span style="margin-right:20px"
|
||||
class="glyphicon glyphicon-shopping-cart"
|
||||
aria-hidden="true"></span>Buy
|
||||
</button>
|
||||
<h6><a href="#"><span class="glyphicon glyphicon-heart-empty" style="cursor:pointer;"></span>
|
||||
Like</a></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div>
|
||||
<form class="form-inline" method="POST" name="form" action="/WebGoat/challenge/flag">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-flag-checkered" aria-hidden="true"
|
||||
style="font-size:20px"></i></div>
|
||||
<input type="text" class="form-control" id="flagInpu2"
|
||||
placeholder="a7179f89-906b-4fec-9d99-f15b796e7208"/>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit flag</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="attack-feedback"></div>
|
||||
<div class="attack-output"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,33 @@
|
||||
$(document).ready(function(){
|
||||
//-- Click on detail
|
||||
$("ul.menu-items > li").on("click",function(){
|
||||
$("ul.menu-items > li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
|
||||
$(".attr,.attr2").on("click",function(){
|
||||
var clase = $(this).attr("class");
|
||||
|
||||
$("." + clase).removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
|
||||
//-- Click on QUANTITY
|
||||
$(".btn-minus").on("click",function(){
|
||||
var now = $(".section > div > input").val();
|
||||
if ($.isNumeric(now)){
|
||||
if (parseInt(now) -1 > 0){ now--;}
|
||||
$(".section > div > input").val(now);
|
||||
}else{
|
||||
$(".section > div > input").val("1");
|
||||
}
|
||||
})
|
||||
$(".btn-plus").on("click",function(){
|
||||
var now = $(".section > div > input").val();
|
||||
if ($.isNumeric(now)){
|
||||
$(".section > div > input").val(parseInt(now)+1);
|
||||
}else{
|
||||
$(".section > div > input").val("1");
|
||||
}
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user