Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MetaGer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
54
Issues
54
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
open-source
MetaGer
Commits
174c6052
Commit
174c6052
authored
Jan 16, 2018
by
Karl Hasselbring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verbessertes Kartendesign, jetzt auch für Quicktips
parent
9cb547ba
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
114 deletions
+90
-114
app/Models/Result.php
app/Models/Result.php
+3
-4
app/Models/Searchengine.php
app/Models/Searchengine.php
+1
-1
resources/assets/less/metager/quicktips.less
resources/assets/less/metager/quicktips.less
+6
-16
resources/assets/less/metager/result.less
resources/assets/less/metager/result.less
+46
-50
resources/views/layouts/ad.blade.php
resources/views/layouts/ad.blade.php
+13
-14
resources/views/layouts/result.blade.php
resources/views/layouts/result.blade.php
+21
-29
No files found.
app/Models/Result.php
View file @
174c6052
...
...
@@ -22,13 +22,12 @@ class Result
public
$engineBoost
=
1
;
# Der Boost für den Provider des Suchergebnisses
public
$valid
=
true
;
# Ob das Ergebnis noch gültig ist (bool)
public
$host
;
# Der aus dem Link gelesene Host des Suchergebnisses
public
$strippedHost
;
# Der Host
in Form "foo.bar.de"
public
$strippedDomain
;
# Die Domain
in Form "bar.de"
public
$strippedLink
;
# Der Link
in Form "foo.bar.de/test"
public
$strippedHost
;
# Der Host in Form "foo.bar.de"
public
$strippedDomain
;
# Die Domain in Form "bar.de"
public
$strippedLink
;
# Der Link in Form "foo.bar.de/test"
public
$rank
;
# Das Ranking für das Ergebnis
# Erstellt ein neues Ergebnis
#public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $partnershop = false, $image = "", $price = 0, $additionalInformation = [])
public
function
__construct
(
$provider
,
$titel
,
$link
,
$anzeigeLink
,
$descr
,
$gefVon
,
$sourceRank
,
$additionalInformation
=
[])
{
$provider
=
simplexml_load_string
(
$provider
);
...
...
app/Models/Searchengine.php
View file @
174c6052
...
...
@@ -71,7 +71,7 @@ abstract class Searchengine
$this
->
useragent
=
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"
;
$this
->
ip
=
$metager
->
getIp
();
$this
->
gefVon
=
"<a href=
\"
"
.
$this
->
homepage
.
"
\"
target=
\"
_blank
\"
rel=
\"
noopener
\"
>"
.
$this
->
displayName
.
"</a>"
;
$this
->
gefVon
=
$this
->
displayName
;
$this
->
startTime
=
microtime
();
# Suchstring generieren
...
...
resources/assets/less/metager/quicktips.less
View file @
174c6052
/* Quicktips */
/*
* <div id="quicktips">
* <div class="quicktip" type="TYPE">
* <details>
* <summary>
* <h1><a href="URL">TITLE
* <p>SUMMARY
* <div class="quicktip-detail">
* <h1><a href="DETAILURL">DETAILTITLE
* <p>DETAILSUMMARY
* <span>GEFVON
* </...>
*/
#quicktips {
display: flex;
flex-direction: column;
...
...
@@ -25,7 +10,12 @@
.quicktip {
margin: 10px 0px;
padding: 10px 0px 10px 10px;
width: 100%;
border: 1px solid #ccc;
border-left: 3px solid #fb0;
@media(max-width: @screen-xs-max) {
box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24);
}
details:not([open=""]) {
.quicktip-summary p {
white-space: nowrap;
...
...
@@ -81,7 +71,7 @@
}
}
&[type=spendenaufruf] {
border
-left: #ddd
;
border
: none
;
color: #ff8000;
.quicktip-summary {
display: flex;
...
...
resources/assets/less/metager/result.less
View file @
174c6052
...
...
@@ -11,40 +11,35 @@
@media(max-width: @screen-xs-max) {
box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24);
}
.result-title {
margin: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
a,
a:active,
a:hover,
a:focus,
a:visited {
color: black;
font-size: @result-font-large;
font-weight: bold;
text-decoration: none;
}
}
.result-header {
display: flex;
>*:not(:first-child) {
margin-left: 15px;
.result-title {
margin: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: @result-font-large;
a {
&,
&:active,
&:hover,
&:focus,
&:visited {
color: black;
text-decoration: none;
}
}
}
.result-link {
overflow: auto;
a,
a:active,
a:hover,
a:focus,
a:visited {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: @result-font-small;
&,
&:active,
&:hover,
&:focus,
&:visited {
color: #333;
font-size: @result-font-small;
text-decoration: none;
}
}
...
...
@@ -85,13 +80,19 @@
margin-top: 25px;
display: flex;
flex-wrap: wrap;
&>* {
margin
: 1
0px;
&>*
:not(:first-child)
{
margin
-left: 2
0px;
}
.result-open a {
color: #ff8000;
.result-open {
&,
&:active,
&:hover,
&:focus,
&:visited {
color: #ff8000;
}
}
.result-open-newtab
a
{
.result-open-newtab {
&,
&:active,
&:hover,
...
...
@@ -102,8 +103,7 @@
text-decoration: none;
}
}
.result-open-proxy,
.result-open-proxy a {
.result-open-proxy {
&,
&:active,
&:hover,
...
...
@@ -144,6 +144,7 @@
background-color: #e0e0e0;
}
a,
a:active,
a:hover,
a:focus,
a:visited {
...
...
@@ -154,19 +155,14 @@
}
}
&.ad .ad-label {
border: green solid 1px;
padding: 1px;
color: green;
border-radius: 4px;
}
.result-information {
border-radius: 5px;
padding-left: 0px;
&>.save {
position: absolute;
top: 0;
right: 10px;
cursor: pointer;
&,
& a,
& a:active,
& a:hover,
& a:focus,
& a:visited {
font-size: @result-font-small;
color: #555;
}
}
&>.remover {
...
...
resources/views/layouts/ad.blade.php
View file @
174c6052
@
if
(
isset
(
$ad
)
&&
!
$apiAuthorized
)
<
div
class
=
"result ad"
>
<
h2
class
=
"result-title"
>
<
a
class
=
"title"
href
=
"{{
$ad->link
}}"
target
=
"{{
$metager->getNewtab
() }}"
data
-
hoster
=
"{{
$ad->gefVon
}}"
data
-
count
=
"0"
>
{{
$ad
->
titel
}}
</
a
>
</
h2
>
<
a
class
=
"ad-label"
href
=
"{!!
$ad->link
!!}"
target
=
"_blank"
rel
=
"noopener"
>
Werbung
von
{
!!
$ad
->
gefVon
!!
}
</
a
>
</
span
>
<
div
class
=
"result-header"
>
<
div
class
=
"result-link
"
>
<
a
href
=
"{{
$ad->link
}}"
target
=
"{{
$metager->getNewtab
() }}"
data
-
hoster
=
"{{
$ad->gefVon
}}"
data
-
count
=
"0"
>
{{
$ad
->
anzeigeLink
}}
<
h2
class
=
"result-title
"
>
<
a
href
=
"{{
$ad->link
}}"
target
=
"{{
$metager->getNewtab
() }}"
>
{{
$ad
->
titel
}}
</
a
>
</
div
>
<
span
class
=
"result-hoster
"
>
<
span
class
=
"ad-label"
>
{
!!
trans
(
'ad.werbung'
)
!!
}
</
span
>
{
!!
trans
(
'ad.von'
)
!!
}
{
!!
$ad
->
gefVon
!!
}
</
span
>
</
h2
>
<
a
class
=
"result-link"
href
=
"{{
$ad->link
}}"
target
=
"{{
$metager->getNewtab
() }}
"
>
{{
$ad
->
anzeigeLink
}
}
</
a
>
</
div
>
<
div
class
=
"result-description"
>
{{
$ad
->
descr
}}
<
div
class
=
"result-body"
>
<
div
class
=
"result-description"
>
{{
$ad
->
descr
}}
</
div
>
</
div
>
</
div
>
@
endif
resources/views/layouts/result.blade.php
View file @
174c6052
<div
class=
"result"
data-count=
"{{ $result->number }}"
>
<h2
class=
"result-title"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
data-count=
"{{ $result->number }}"
rel=
"noopener"
>
{!! $result->titel !!}
</a>
</h2>
<div
class=
"result"
>
<div
class=
"result-header"
>
<
div
class=
"result-link
"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
data-count=
"{{ $result->number }}"
rel=
"noopener"
>
{
{ $result->anzeigeLink }
}
<
h2
class=
"result-title
"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{
!! $result->titel !!
}
</a>
</div>
</h2>
<a
class=
"result-link"
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{{ $result->anzeigeLink }}
</a>
@if( isset($result->partnershop)
&&
$result->partnershop === TRUE )
<span
class=
"partnershop-info"
>
<img
src=
"/img/boosticon.png"
height=
"13"
alt=
""
>
...
...
@@ -20,14 +18,14 @@
<div
class=
"result-body"
>
@if( isset($result->logo) )
<div
class=
"result-logo"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
data-count=
"{{ $result->number }}
"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener
"
>
<img
src=
"{{ $metager->getImageProxyLink($result->logo) }}"
alt=
""
/>
</a>
</div>
@endif
@if( $result->image !== "" )
<div
class=
"result-image result-description"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
data-count=
"{{ $result->number }}"
rel=
"noopener"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"{{ $metager->getImageProxyLink($result->image) }}"
align=
"left"
width=
"120px"
height=
"60px"
alt=
""
/>
</a>
{!! $result->descr !!}
...
...
@@ -45,22 +43,16 @@
@endif
</div>
<div
class=
"result-footer"
>
<div
class=
"result-open"
>
<a
href=
"{{ $result->link }}"
target=
"_self"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
rel=
"noopener"
>
<span>
ÖFFNEN
</span>
</a>
</div>
<div
class=
"result-open-newtab"
>
<a
href=
"{{ $result->link }}"
target=
"_blank"
data-hoster=
"{{ strip_tags($result->gefVon) }}"
rel=
"noopener"
>
<span>
IN NEUEM TAB
</span>
</a>
</div>
<div
class=
"result-open-proxy"
>
<a
onmouseover=
"$(this).popover('show');"
onmouseout=
"$(this).popover('hide');"
data-toggle=
"popover"
data-placement=
"auto right"
data-container=
"body"
data-content=
"@lang('result.proxytext')"
href=
"{{ $result->proxyLink }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"/img/proxyicon.png"
alt=
""
/>
<span>
ANONYM ÖFFNEN
</span>
</a>
</div>
<a
class=
"result-open"
href=
"{{ $result->link }}"
target=
"_self"
rel=
"noopener"
>
ÖFFNEN
</a>
<a
class=
"result-open-newtab"
href=
"{{ $result->link }}"
target=
"_blank"
rel=
"noopener"
>
IN NEUEM TAB
</a>
<a
class=
"result-open-proxy"
onmouseover=
"$(this).popover('show');"
onmouseout=
"$(this).popover('hide');"
data-toggle=
"popover"
data-placement=
"auto right"
data-container=
"body"
data-content=
"@lang('result.proxytext')"
href=
"{{ $result->proxyLink }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"/img/proxyicon.png"
alt=
""
/>
ANONYM ÖFFNEN
</a>
<div
class=
"result-options"
>
<a
class=
"dropdown-opener"
href=
"javascript:void(0);"
>
<i
class=
"fa fa-chevron-down option-opener-icon"
aria-hidden=
"true"
></i>
...
...
@@ -72,7 +64,7 @@
</li>
<hr>
<li
class=
"js-only"
>
<a
href=
"javascript:resultSaver({{ $result->number }});"
class=
"saver"
data-counter=
"{{ $result->number }}"
>
<a
href=
"javascript:resultSaver({{ $result->number }});"
class=
"saver"
>
<i
class=
"fa fa-floppy-o"
></i>
{!! trans('result.options.savetab') !!}
</a>
</li>
...
...
Write
Preview
Markdown
is supported
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