Front end clean up continued

Cleaned up the front end structure a bit more so the layout is unified
across pages, excluding the index which will serve as the main search
page, which has it's own style.

Location page was also added to display details of instances listed in
the database. It's mostly just informational so it will be kept simple.
symfony-version
Ro 2 years ago
parent 477d6727f4
commit b9298451b7

@ -11,23 +11,32 @@ section[role="start"] {
section[role="start"] div[role="index-wrapper"] { section[role="start"] div[role="index-wrapper"] {
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
max-width: 600px;
padding-top: 30px;
} }
section[role="start"] div[role="index-search"] { section[role="start"] div[role="index-search"] {
background: var(--primary); width: 100%;
border-radius: 5px; border-bottom: 1px solid var(--secondary);
padding: 15px; }
section[role="start"] div[role="index-results"] {
width: 100%;
padding: 10px;
background: rgb(var(--primary-rgb) / 60%);
border-bottom: 1px solid var(--white);
} }
section[role="start"] div input[type="text"] { section[role="start"] div input[type="text"] {
font-size: 2em; background: none;
width: 87%; font-weight: bold;
font-size: 3.5em;
width: 91%;
color: var(--white);
text-shadow: 1px 1px 1px var(--primary);
outline: none;
} }
section[role="start"] div button { section[role="start"] div button {
vertical-align: top; vertical-align: text-bottom;
width: 57px; width: 57px;
height: 57px; height: 57px;
} }
@ -36,9 +45,14 @@ section[role="start"] div button i {
font-size: 1.5em; font-size: 1.5em;
} }
section[role="start"] h1 {
color: var(--white);
}
section[role="start"] a.search-link { section[role="start"] a.search-link {
background: var(--secondary); color: var(--highlight);
padding: 5px; font-size: 2.5em;
color: var(--primary); font-weight: bold;
border-radius: 3px; border: 0;
display: block;
} }

@ -9,4 +9,8 @@ section[role="listings"] {
section[role="listings"] a { section[role="listings"] a {
color: var(--highlight); color: var(--highlight);
font-size: 2.5em;
font-weight: bold;
border: 0;
display: block;
} }

@ -0,0 +1,15 @@
section[role="location"] {
background: var(--primary);
width: 100%;
max-width: 600px;
padding: 10px;
margin: 0 auto;
color: var(--white);
}
section[role="location"] img {
width: 33%;
border-radius: 3px;
overflow: hidden;
vertical-align: top;
}

@ -6,3 +6,4 @@
@import "index.css"; @import "index.css";
@import "about.css"; @import "about.css";
@import "listing.css"; @import "listing.css";
@import "location.css";

@ -6,4 +6,5 @@
--white: #efebe3; --white: #efebe3;
--grey: #abb7b7; --grey: #abb7b7;
--black: #32302f; --black: #32302f;
--primary-rgb: 20 13 13;
} }

@ -27,7 +27,8 @@ class Index extends AbstractController
$results = $locations->searchLocations($request->request->get("index_search")); $results = $locations->searchLocations($request->request->get("index_search"));
return $render->page( return $render->page(
["count" => count($list), ["count" => count($list),
"items" => $results['items'] "items" => $results['items'],
"terms" => $results["terms"]
], ],
"This is The Bad Space", "This is The Bad Space",
"front/index.twig" "front/index.twig"

@ -8,24 +8,27 @@
<div role="index-wrapper"> <div role="index-wrapper">
<div role="index-search"> <div role="index-search">
<form action="{{ path('index') }}" method="post" enctype="multipart/form-data"> <form action="{{ path('index') }}" method="post" enctype="multipart/form-data">
<input type="text" name="index_search" value="" placeholder="Take a look"/> <input type="text" name="index_search" value="" placeholder="SEARCH ME!"/>
<button> <button>
<i class="ti ti-search"></i> <i class="ti ti-search"></i>
</button> </button>
</form> </form>
{{ options.count }}
Bad Spaces tracked. Shot by
<a href="https://unsplash.com/photos/935EcPU1pBI">Ussama Azam</a>
</div> </div>
{% if options.items is defined %}
<div role="index-results"> <div role="index-results">
<h3>Found</h3> {% if options.items is defined %}
<h1>Found Stuff for:
{{ options.terms }}</h1>
{% for item in options.items %} {% for item in options.items %}
<a class="search-link" href="/location/{{ item.uuid }}">{{ item.name }}</a><br/> <a class="search-link" href="/location/{{ item.uuid }}">{{ item.name }}</a><br/>
{% endfor %} {% endfor %}
</div>
{% endif %} {% endif %}
{{ options.count }}
Bad Spaces tracked. Shot by
<a href="https://unsplash.com/photos/935EcPU1pBI">Ussama Azam</a>
</div>
</div> </div>

@ -5,9 +5,17 @@
{% block main %} {% block main %}
<section role="location"> <section role="location">
<h1>About <h1>{{ options.location.name }}</h1>
{{ options.location.name }}</h1> <h2>Description</h2>
<p>{{ options.location.description }}</p>
This is a location <h3>Snaps</h3>
{% for image in options.location.images %}
<a target="_blank" href="/assets/images/examples/{{ image.path }}">
<img src="/assets/images/examples/{{ image.path }}"/>
</a>
{% endfor %}
<br/>
<strong>TAGS:</strong>
{{ options.location.tags }}
</section> </section>
{% endblock %} {% endblock %}

Loading…
Cancel
Save