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
693253c7
Commit
693253c7
authored
Jun 07, 2017
by
Phil Höfer
Browse files
neue Ausgabe funktioniert grundsätzlich
parent
bfb3295c
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
693253c7
...
...
@@ -143,6 +143,7 @@ class MetaGer
break
;
case
'rich'
:
return
view
(
'metager3rich'
)
->
with
(
'results'
,
$viewResults
)
->
with
(
'eingabe'
,
$this
->
eingabe
)
->
with
(
'mobile'
,
$this
->
mobile
)
->
with
(
'warnings'
,
$this
->
warnings
)
...
...
@@ -1181,7 +1182,7 @@ class MetaGer
public
function
popAd
()
{
if
(
count
(
$this
->
ads
)
>
0
)
{
return
get_object_vars
(
array_shift
(
$this
->
ads
)
)
;
return
array_shift
(
$this
->
ads
);
}
else
{
return
null
;
}
...
...
resources/views/layouts/rich/ad.blade.php
0 → 100644
View file @
693253c7
@
if
(
$result
)
<
article
class
=
"search-result ad card elevation-1"
>
<
div
class
=
"result-content"
>
<
h1
class
=
"result-title"
>
{{
$result
->
titel
}}
</
h1
>
<
h2
class
=
"result-display-link"
>
{{
$result
->
anzeigeLink
}}
</
h2
>
<
p
class
=
"result-description"
>
{{
$result
->
descr
}}
</
p
>
<
p
class
=
"result-source"
>
Werbung
von
{
!!
$result
->
gefVon
!!
}
</
p
>
@
if
(
isset
(
$result
->
logo
)
)
<
img
class
=
"result-thumbnail"
src
=
"{{
$metager->getImageProxyLink
(
$result->logo
) }}"
alt
=
""
/>
@
endif
</
div
>
<
div
class
=
"result-action-area"
>
<
a
class
=
"result-action primary"
href
=
"{{
$result->link
}}"
>
Öffnen
</
a
>
<
a
class
=
"result-action primary"
target
=
"_blank"
href
=
"{{
$result->link
}}"
>
Neuer
Tab
</
a
>
</
div
>
</
article
>
@
endif
resources/views/layouts/rich/result.blade.php
0 → 100644
View file @
693253c7
<article
class=
"search-result card elevation-1"
>
<div
class=
"result-content"
>
<h1
class=
"result-title"
>
{{ $result->titel }}
</h1>
<h2
class=
"result-display-link"
>
{{ $result->anzeigeLink }}
</h2>
<p
class=
"result-description"
>
{{ $result->descr }}
</p>
<p
class=
"result-source"
>
gefunden von {!! $result->gefVon !!}
</p>
@if( isset($result->logo) )
<img
class=
"result-thumbnail"
src=
"{{ $metager->getImageProxyLink($result->logo) }}"
alt=
""
/>
@endif
</div>
<div
class=
"result-action-area"
>
<a
class=
"result-action primary"
href=
"{{ $result->link }}"
>
Öffnen
</a>
<a
class=
"result-action primary"
target=
"_blank"
href=
"{{ $result->link }}"
>
Neuer Tab
</a>
<a
class=
"result-action"
target=
"_blank"
href=
"{{ $result->proxyLink }}"
>
Anonym Öffnen
</a>
</div>
</article>
resources/views/metager3rich.blade.php
View file @
693253c7
...
...
@@ -23,38 +23,20 @@
<button
type=
"submit"
class=
"search-button fa"
>
</button>
@foreach( $metager->request->all() as $key => $value)
@if($key !== "eingabe"
&&
$key !== "page"
&&
$key !== "next")
<input
type=
'
hidden
'
name=
'
{{ $key }}
'
value=
'
{{ $value }}
'
form=
'submitForm'
/>
<input
type=
"
hidden
"
name=
"
{{ $key }}
"
value=
"
{{ $value }}
"
/>
@endif
@endforeach
</form>
</header>
<details
class=
"focus-card card elevation-1"
>
@if( $metager->getFokus() === "web" )
<summary
class=
"focus-cell"
><div
class=
"focus-cell-label"
><span
class=
"icon fa"
aria-hidden=
"true"
>
</span>
<b>
Web
</b></div></summary>
@endif
</details>
<main
class=
"results-container"
>
@foreach($metager->getResults() as $result)
@if($result->number % 7 === 0)
@include('layouts.ad', ['
ad
' => $metager->popAd()])
@include('layouts.
rich.
ad', ['
result
' => $metager->popAd()])
@endif
<article
class=
"search-result card elevation-1"
>
<div
class=
"result-content"
>
<h1
class=
"result-title"
>
{{ $result->titel }}
</h1>
<h2
class=
"result-display-link"
>
{{ $result->anzeigeLink }}
</h2>
<p
class=
"result-description"
>
{{ $result->descr }}
</p>
<p
class=
"result-source"
>
gefunden von {!! $result->gefVon !!}
</p>
@if( isset($result->logo) )
<img
class=
"result-thumbnail"
src=
"{{ $metager->getImageProxyLink($result->logo) }}"
alt=
""
/>
@endif
</div>
<div
class=
"result-action-area"
>
<a
class=
"result-action primary"
href=
"{{ $result->link }}"
>
Öffnen
</a>
<a
class=
"result-action primary"
target=
"_blank"
href=
"{{ $result->link }}"
>
Neuer Tab
</a>
<a
class=
"result-action"
target=
"_blank"
href=
"{{ $result->proxyLink }}"
>
Anonym Öffnen
</a>
</div>
</article>
@include('layouts.rich.result', ['result' => $result])
@endforeach
</main>
@if($metager->getPage() === 1)
...
...
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