Skip to content

Commit

Permalink
template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dunkrupp committed Mar 3, 2018
1 parent 3394c76 commit ef5a11c
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 19 deletions.
Empty file.
167 changes: 167 additions & 0 deletions resources/views/dns_records_result.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{% extends 'layouts/app.twig' %}

{% block title %}Berserkers | Results{% endblock %}

{% block content %}
<div class="row body align-items-center justify-content-center">

<div class="col">
{% if records|length > 0 %}
{# A/AAAA RECORDS #}
<div class="table-responsive">
<h5 class="section-header" aria-expanded="true">A\AAAA Records
<i class="fas fa-angle-double-up section-expander"></i></h5>
<table class="table table-dark table-striped">
{% if records.a|length > 0 or record.aaaa|length > 0 %}
<thead>
<tr>
<th scope="col" class="type">TYPE</th>
<th scope="col" class="class">CLASS</th>
<th scope="col" class="ttl">TTL</th>
<th scope="col">IP</th>
</tr>
</thead>
{% for record in records.a %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.ip }}</td>
</tr>
{% endfor %}
{% for record in records.aaaa %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.ip }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# END A/AAAA RECORDS #}

{# MX RECORDS #}
<div class="table-responsive">
<h5 class="section-header" aria-expanded="true">MX Records
<i class="fas fa-angle-double-up section-expander"></i>
</h5>
<table class="table table-dark table-striped">
{% if records.mx|length > 0 %}
<thead>
<tr>
<th scope="col" class="type">TYPE</th>
<th scope="col" class="class">CLASS</th>
<th scope="col" class="ttl">TTL</th>
<th scope="col">HOST</th>
<th scope="col">PRI</th>
</tr>
</thead>
{% for record in records.mx %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.target }}</td>
<td>{{ record.pri }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# END MX RECORDS #}

{# NS RECORDS #}
<div class="table-responsive">
<h5 class="section-header" aria-expanded="true">NS Records
<i class="fas fa-angle-double-up section-expander"></i>
</h5>
<table class="table table-dark table-striped">
{% if records.ns|length > 0 %}
<thead>
<tr>
<th scope="col" class="type">TYPE</th>
<th scope="col" class="class">CLASS</th>
<th scope="col" class="ttl">TTL</th>
<th scope="col">HOST</th>
</tr>
</thead>
{% for record in records.ns %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.target }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# END NS RECORDS #}

{# SOA RECORDS #}
<div class="table-responsive">
<h5 class="section-header" aria-expanded="true">SOA Records
<i class="fas fa-angle-double-up section-expander"></i>
</h5>
<table class="table table-dark table-striped">
{% if records.soa|length > 0 %}
<thead>
<tr>
<th scope="col" class="type">TYPE</th>
<th scope="col" class="class">CLASS</th>
<th scope="col" class="ttl">TTL</th>
<th scope="col">HOST</th>
<th scope="col">SERIAL</th>
</tr>
</thead>
{% for record in records.soa %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.mname }}</td>
<td>{{ record.serial }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# END SOA RECORDS #}

{# TXT RECORDS #}
<div class="table-responsive">
<h5 class="section-header" aria-expanded="true">TXT Records
<i class="fas fa-angle-double-up section-expander"></i>
</h5>
<table class="table table-dark table-striped">
{% if records.txt|length > 0 %}
<thead>
<tr>
<th scope="col" class="type">TYPE</th>
<th scope="col" class="class">CLASS</th>
<th scope="col" class="ttl">TTL</th>
<th scope="col">ENTRY</th>
</tr>
</thead>
{% for record in records.txt %}
<tr>
<td>{{ record.type }}</td>
<td>{{ record.class }}</td>
<td>{{ record.ttl }}</td>
<td>{{ record.txt }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# END TXT RECORDS #}
{% else %}
<div class="no-records">
No results could be found for your query.
</div>
{% endif %}
</div>
</div>
{% endblock %}
7 changes: 4 additions & 3 deletions resources/views/home.twig → resources/views/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{% block title %}Berserkers | Home{% endblock %}

{% block content %}
<div class="row body align-items-center justify-content-center">
<div class="row float-input align-items-center justify-content-center">

{% include 'partials/flash.twig' %}

<div class="col col-lg-6 col-md-10 col-sm-12">
<div class="col col-lg-8 col-md-10 col-sm-12">
<fieldset class="fieldset dns-search">
<legend>Welcome {{ clientIp() | raw }}</legend>
<form action="{{ path_for('post.results') }}" method="post" accept-charset="UTF-8">
Expand All @@ -18,11 +18,12 @@
class="form-control form-control-lg seamless-input bg-dark"
type="text"
title="DNS Lookup"
placeholder="domain or ip"
placeholder="enter domain or ip"
minlength="6"
maxlength="60"
required
value="{{ old.search }}"
autocomplete="off"
>
</div>
<button type="submit" class="btn btn-primary"><i class="fas fa-search"></i> Search</button>
Expand Down
6 changes: 5 additions & 1 deletion resources/views/partials/footer.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
&nbsp;&nbsp;|&nbsp;&nbsp;
{{ copyright() | raw }}
</div>
</div>
</div>
{# JS #}
<script type="text/javascript" src="{{ baseUrl }}/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="{{ baseUrl }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ baseUrl }}/js/app.js"></script>
5 changes: 1 addition & 4 deletions resources/views/partials/head.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@
<link rel="stylesheet" href="{{ baseUrl }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ baseUrl }}/css/fontawesome-all.min.css">
<link rel="stylesheet" href="{{ baseUrl }}/css/app.css">
{# JS #}
<script type="text/javascript" src="{{ baseUrl }}/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="{{ baseUrl }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ baseUrl }}/js/app.js"></script>

1 change: 0 additions & 1 deletion resources/views/partials/header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<a href="{{ path_for('get.index') }}" class="navbar-brand">
<img class="d-inline-block align-top" src="/img/logo.png" alt="berserkers.net">
berserkers.net
</a>

<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
Expand Down
10 changes: 0 additions & 10 deletions resources/views/results.twig

This file was deleted.

Empty file added resources/views/whois.twig
Empty file.

0 comments on commit ef5a11c

Please sign in to comment.