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
56be5836
Commit
56be5836
authored
Aug 10, 2018
by
Karl Hasselbring
Browse files
Sprueche auf csv version umgestellt
parent
a58f8995
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Models/Quicktips/Quicktip.php
View file @
56be5836
...
...
@@ -9,17 +9,19 @@ class Quicktip
public
$link
;
public
$gefVonTitle
;
public
$gefVonLink
;
public
$author
;
public
$descr
;
public
$details
;
# Erstellt ein neues Ergebnis
public
function
__construct
(
$type
,
$title
,
$link
,
$gefVonTitle
,
$gefVonLink
,
$descr
,
$details
)
public
function
__construct
(
$type
,
$title
,
$link
,
$gefVonTitle
,
$gefVonLink
,
$author
,
$descr
,
$details
)
{
$this
->
type
=
$type
;
$this
->
title
=
$title
;
$this
->
link
=
$link
;
$this
->
gefVonTitle
=
$gefVonTitle
;
$this
->
gefVonLink
=
$gefVonLink
;
$this
->
author
=
$author
;
$this
->
descr
=
$descr
;
$this
->
details
=
$details
;
}
...
...
app/Models/Quicktips/Quicktips.php
View file @
56be5836
...
...
@@ -136,6 +136,14 @@ class Quicktips
$gefVonLink
=
""
;
}
$quicktip_xml
->
registerXPathNamespace
(
'mg'
,
'http://metager.de/opensearch/quicktips/'
);
$author
=
$quicktip_xml
->
xpath
(
'mg:author'
);
if
(
sizeof
(
$author
)
>
0
)
{
$author
=
$author
[
0
]
->
__toString
();
}
else
{
$author
=
""
;
}
// Description
$descr
=
$quicktip_xml
->
content
->
__toString
();
...
...
@@ -160,6 +168,7 @@ class Quicktips
$link
,
$gefVonTitle
,
$gefVonLink
,
$author
,
$descr
,
$details
);
...
...
resources/assets/less/metager/quicktips.less
View file @
56be5836
...
...
@@ -117,30 +117,41 @@
color: #404040;
font-style: italic;
align-self: flex-end;
quotes: '„' '”';
&:before {
content: open-quote;
}
&:after {
content: close-quote;
}
}
.author {
color: #404040;
font-style: italic;
float: right;
}
}
}
&[type=duckDuckGo-bang] {
order: 2;
.bang-btn {
width: 100%;
margin-top: 5px;
color: #fff;
background-color: #286992;
font-size: 16px;
&[type=duckDuckGo-bang] {
order: 2;
.bang-btn {
width: 100%;
margin-top: 5px;
color: #fff;
background-color: #286992;
font-size: 16px;
}
}
&[type=wikipedia] {
order: 3;
}
&[type=dictCC] {
order: 4;
}
&[type=tip] {
order: 5;
}
&[type=ad] {
order: 6;
}
}
&[type=wikipedia] {
order: 3;
}
&[type=dictCC] {
order: 4;
}
&[type=tip] {
order: 5;
}
&[type=ad] {
order: 6;
}
}
}
\ No newline at end of file
}
\ No newline at end of file
resources/views/parts/quicktip.blade.php
View file @
56be5836
...
...
@@ -24,6 +24,9 @@
<
i
class
=
"quicktip-extender fa fa-chevron-down"
></
i
>
</
div
>
<
p
class
=
"quicktip-description"
>
{
!!
$quicktip
->
descr
!!
}
</
p
>
@
if
(
$quicktip
->
author
!=
""
)
<
span
class
=
"author"
>
{{
$quicktip
->
author
}}
</
span
>
@
endif
</
summary
>
@
foreach
(
$quicktip
->
details
as
$detail
)
<
div
class
=
"quicktip-detail"
>
...
...
@@ -62,5 +65,8 @@
@
endif
</
div
>
<
p
>
{
!!
$quicktip
->
descr
!!
}
</
p
>
@
if
(
$quicktip
->
author
!=
""
)
<
span
class
=
"author"
>
{{
$quicktip
->
author
}}
</
span
>
@
endif
</
div
>
@
endif
\ No newline at end of file
@
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