do some revisions? ¯(°_o)/¯
This commit is contained in:
parent
c6830ad4c1
commit
f26d231492
|
@ -198,6 +198,26 @@ div.crypto-card p {
|
|||
background-color: #4f4f4fff;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.tor {
|
||||
border-radius: 8px;
|
||||
border: 0px;
|
||||
color: #4f4f4fff;
|
||||
background-color: #7D4699;
|
||||
padding: 16px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 4px 2px;
|
||||
-webkit-transition-duration: 0.4s;
|
||||
transition-duration: 0.4s;
|
||||
cursor: pointer;
|
||||
border: 2px solid #7D4699;
|
||||
}
|
||||
.tor:hover {
|
||||
background-color: #4f4f4fff;
|
||||
color: #7D4699;
|
||||
}
|
||||
.contact-card {
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.3);
|
||||
background: #4f4f4fff;
|
||||
|
|
17
app.js
17
app.js
|
@ -4,10 +4,8 @@ $(function(){
|
|||
var model = {
|
||||
// renomear
|
||||
dat: [
|
||||
|
||||
],
|
||||
read_json: function() {
|
||||
|
||||
$.ajax({
|
||||
url: "/cards.json",
|
||||
dataType: 'json',
|
||||
|
@ -19,7 +17,6 @@ $(function(){
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
set_data: function(d) {
|
||||
model.dat.push(d);
|
||||
|
@ -40,15 +37,12 @@ $(function(){
|
|||
$filter.push($d[i]);
|
||||
}
|
||||
});
|
||||
|
||||
return $filter;
|
||||
},
|
||||
init: function() {
|
||||
model.read_json();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var octopus = {
|
||||
init: function() {
|
||||
model.init();
|
||||
|
@ -57,13 +51,13 @@ $(function(){
|
|||
},
|
||||
create_card: function(d) {
|
||||
$.each(d, function(i){
|
||||
view.create_card(d[i].name, d[i].description, d[i].button_text, d[i].link);
|
||||
view.create_card(d[i].name, d[i].description, d[i].button_text, d[i].link, d[i].tor);
|
||||
});
|
||||
},
|
||||
filter_data: function(c) {
|
||||
var d = model.filter_data(c);
|
||||
$.each(d, function(i){
|
||||
view.create_card(d[i].name, d[i].description, d[i].button_text, d[i].link);
|
||||
view.create_card(d[i].name, d[i].description, d[i].button_text, d[i].link, d[i].tor);
|
||||
});
|
||||
},
|
||||
recreate_cards: function() {
|
||||
|
@ -82,14 +76,11 @@ $(function(){
|
|||
this.search_field.on('input',function(){
|
||||
var $conteudo = $(this).val();
|
||||
view.clean_cards();
|
||||
|
||||
|
||||
if($conteudo.length == 0){
|
||||
octopus.recreate_cards();
|
||||
}else {
|
||||
octopus.filter_data($conteudo);
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
create_card: function(name, desc, bt_txt, link){
|
||||
|
@ -98,8 +89,6 @@ $(function(){
|
|||
var $desc = $("<p>").text(desc);
|
||||
var $button = $("<button>").addClass("button").text(bt_txt);
|
||||
var $a = $("<a>").attr("href", link);
|
||||
|
||||
|
||||
$a.append($button);
|
||||
$card.append($h1).append($desc).append($a);
|
||||
this.container.append($card);
|
||||
|
@ -108,7 +97,5 @@ $(function(){
|
|||
this.container.empty();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
octopus.init();
|
||||
});
|
||||
|
|
|
@ -23,6 +23,6 @@ priority: 0.9
|
|||
<!-- JS cards here -->
|
||||
</div>
|
||||
</div>
|
||||
<center><h1><u><a href="https://wiki.nixnet.xyz/shelves/nixnet" target="_blank">Technical information about NixNet</a></u></h1></center>
|
||||
<center><h1><u><a href="https://git.nixnet.xyz/NixNet/" target="_blank">Technical information about NixNet</a></u></h1></center>
|
||||
<script src="/jquery-3.3.1.min.js" charset="utf-8"></script>
|
||||
<script src="/app.js" charset="utf-8"></script>
|
||||
|
|
Loading…
Reference in New Issue