Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
0dbfba49
Commit
0dbfba49
authored
Jun 29, 2018
by
Karl Hasselbring
Browse files
Preis wird bei Produktsuche jetzt deutlich sichtbar neben Titel angezeigt
parent
73233eb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Models/Result.php
View file @
0dbfba49
...
...
@@ -65,9 +65,22 @@ class Result
$this
->
partnershop
=
isset
(
$additionalInformation
[
"partnershop"
])
?
$additionalInformation
[
"partnershop"
]
:
false
;
$this
->
image
=
isset
(
$additionalInformation
[
"image"
])
?
$additionalInformation
[
"image"
]
:
""
;
$this
->
price
=
isset
(
$additionalInformation
[
"price"
])
?
$additionalInformation
[
"price"
]
:
0
;
$this
->
price_text
=
$this
->
price_to_text
(
$this
->
price
);
$this
->
additionalInformation
=
$additionalInformation
;
}
private
function
price_to_text
(
$price
)
{
$euros
=
$price
/
100
;
$cents
=
$price
%
100
;
$price_text
=
$euros
.
','
;
if
(
$cents
<
10
)
{
$price_text
.
=
'0'
;
}
$price_text
.
=
$cents
.
' €'
;
return
$price_text
;
}
/* Ranked das Ergebnis nach folgenden Aspekten:
* Startwert 0
* + 0.02 * Sourcerank (20 - Position in Ergebnisliste des Suchanbieters)
...
...
resources/assets/less/metager/result.less
View file @
0dbfba49
...
...
@@ -14,7 +14,16 @@
justify-content: space-between;
.result-title {
margin: 0px;
&>* {
font-size: @result-font-large;
}
.overflow-ellipsis;
.result-price {
padding: 0px 10px;
color: white;
background-color: #ff8000;
border-radius: 3px;
}
a {
&,
&:active,
...
...
@@ -23,7 +32,6 @@
&:visited {
color: black;
text-decoration: none;
font-size: @result-font-large;
}
}
}
...
...
@@ -56,10 +64,15 @@
display: flex;
text-align: justify;
.result-image {
width: 180px;
padding-right: 10px;
margin-right: 10px;
& img {
height: 150px;
padding: 0px 10px;
max-width: 100%;
display: block;
max-width: 160px;
max-height: 120px;
width: auto;
height: auto;
}
}
.result-description {
...
...
resources/views/layouts/result.blade.php
View file @
0dbfba49
...
...
@@ -5,6 +5,9 @@
@if(stripos($result->anzeigeLink, "twitter.com") !== false)
<i
class=
"fa fa-twitter"
aria-hidden=
"true"
></i>
@endif
@if( isset($result->price)
&&
$result->price != 0)
<span
class=
"result-price"
>
{!! $result->price_text !!}
</span>
@endif
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{!! $result->titel !!}
</a>
...
...
@@ -32,7 +35,7 @@
@if( $result->image !== "" )
<div
class=
"result-image"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"{{ $metager->getImageProxyLink($result->image) }}"
alt=
""
/>
<img
src=
"{{ $metager->getImageProxyLink($result->image) }}"
align=
"left"
width=
"120px"
height=
"60px"
alt=
""
/>
</a>
</div>
@endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment