Add screen reader description and a favicon

Closes issue #20.
This commit is contained in:
Lucas Verney 2017-04-26 19:12:30 +02:00
parent 3635e7c559
commit f7c7459d96
24 changed files with 44 additions and 6 deletions

View File

@ -84,3 +84,4 @@ See the `CONTRIBUTING.md` file for more infos.
* [Kresus](https://framagit.org/bnjbvr/kresus) which gave me part of the * [Kresus](https://framagit.org/bnjbvr/kresus) which gave me part of the
original idea (at least proved me such software based on scraping can original idea (at least proved me such software based on scraping can
achieve a high quality level :) achieve a high quality level :)
* Current favicon is from [Wikipedia](https://commons.wikimedia.org/wiki/File:Home_Icon.svg)

View File

@ -83,9 +83,15 @@ def get_app(config):
app.route("/", "GET", lambda: _serve_static_file("index.html")) app.route("/", "GET", lambda: _serve_static_file("index.html"))
# Static files # Static files
app.route("/favicon.ico", "GET",
lambda: _serve_static_file("favicon.ico"))
app.route( app.route(
"/assets/<filename:path>", "GET", "/assets/<filename:path>", "GET",
lambda filename: _serve_static_file("/assets/{}".format(filename)) lambda filename: _serve_static_file("/assets/{}".format(filename))
) )
app.route(
"/img/<filename:path>", "GET",
lambda filename: _serve_static_file("/img/{}".format(filename))
)
return app return app

View File

@ -6,28 +6,28 @@
{{ $t("flatsDetails.Title") }} {{ $t("flatsDetails.Title") }}
<span v-if="sortBy === 'title'"> <span v-if="sortBy === 'title'">
<i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i> <i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i>
<span class="sr-only"></span> <span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
</span> </span>
</th> </th>
<th class="pointer" v-on:click="updateSortBy('area')"> <th class="pointer" v-on:click="updateSortBy('area')">
{{ $t("flatsDetails.Area") }} {{ $t("flatsDetails.Area") }}
<span v-if="sortBy === 'area'"> <span v-if="sortBy === 'area'">
<i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i> <i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i>
<span class="sr-only"></span> <span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
</span> </span>
</th> </th>
<th class="pointer" v-on:click="updateSortBy('rooms')"> <th class="pointer" v-on:click="updateSortBy('rooms')">
{{ $t("flatsDetails.Rooms") }} {{ $t("flatsDetails.Rooms") }}
<span v-if="sortBy === 'rooms'"> <span v-if="sortBy === 'rooms'">
<i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i> <i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i>
<span class="sr-only"></span> <span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
</span> </span>
</th> </th>
<th class="pointer" v-on:click="updateSortBy('cost')"> <th class="pointer" v-on:click="updateSortBy('cost')">
{{ $t("flatsDetails.Cost") }} {{ $t("flatsDetails.Cost") }}
<span v-if="sortBy === 'cost'"> <span v-if="sortBy === 'cost'">
<i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i> <i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i>
<span class="sr-only"></span> <span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
</span> </span>
</th> </th>
<th>{{ $t("common.Actions") }}</th> <th>{{ $t("common.Actions") }}</th>
@ -78,6 +78,8 @@
<script> <script>
import "font-awesome-webpack" import "font-awesome-webpack"
import { capitalize } from "../tools"
export default { export default {
data () { data () {
return { return {
@ -116,7 +118,8 @@ export default {
} else { } else {
this.sortBy = field; this.sortBy = field;
} }
} },
capitalize: capitalize
} }
} }
</script> </script>
@ -143,4 +146,13 @@ button {
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.sr-only {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
</style> </style>

View File

@ -8,7 +8,9 @@ export default {
'Restore': 'Restore', 'Restore': 'Restore',
'External_link': 'External link', 'External_link': 'External link',
'Follow': 'Follow', 'Follow': 'Follow',
'Close': 'Close' 'Close': 'Close',
"sortUp": 'Sort in ascending order',
"sortDown": 'Sort in descending order'
}, },
home: { home: {
'new_available_flats': 'New available flats' 'new_available_flats': 'New available flats'

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

@ -4,6 +4,23 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<title>Flatisfy</title> <title>Flatisfy</title>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="icon" sizes="16x16 32x32 64x64" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="196x196" href="/img/favicon-192.png">
<link rel="icon" type="image/png" sizes="160x160" href="/img/favicon-160.png">
<link rel="icon" type="image/png" sizes="96x96" href="/img/favicon-96.png">
<link rel="icon" type="image/png" sizes="64x64" href="/img/favicon-64.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16.png">
<link rel="apple-touch-icon" href="/img/favicon-57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/img/favicon-114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/img/favicon-72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/img/favicon-144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/img/favicon-60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/img/favicon-120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/img/favicon-76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/img/favicon-152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon-180.png">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>