Skip to content
Snippets Groups Projects
Commit be662410 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Sprueche auf csv version umgestellt

parent 23cda137
Branches
No related tags found
1 merge request!1298Resolve "Metager-Sprüche"
...@@ -9,17 +9,19 @@ class Quicktip ...@@ -9,17 +9,19 @@ class Quicktip
public $link; public $link;
public $gefVonTitle; public $gefVonTitle;
public $gefVonLink; public $gefVonLink;
public $author;
public $descr; public $descr;
public $details; public $details;
# Erstellt ein neues Ergebnis # 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->type = $type;
$this->title = $title; $this->title = $title;
$this->link = $link; $this->link = $link;
$this->gefVonTitle = $gefVonTitle; $this->gefVonTitle = $gefVonTitle;
$this->gefVonLink = $gefVonLink; $this->gefVonLink = $gefVonLink;
$this->author = $author;
$this->descr = $descr; $this->descr = $descr;
$this->details = $details; $this->details = $details;
} }
......
...@@ -136,6 +136,14 @@ class Quicktips ...@@ -136,6 +136,14 @@ class Quicktips
$gefVonLink = ""; $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 // Description
$descr = $quicktip_xml->content->__toString(); $descr = $quicktip_xml->content->__toString();
...@@ -160,6 +168,7 @@ class Quicktips ...@@ -160,6 +168,7 @@ class Quicktips
$link, $link,
$gefVonTitle, $gefVonTitle,
$gefVonLink, $gefVonLink,
$author,
$descr, $descr,
$details $details
); );
......
...@@ -117,30 +117,41 @@ ...@@ -117,30 +117,41 @@
color: #404040; color: #404040;
font-style: italic; font-style: italic;
align-self: flex-end; align-self: flex-end;
quotes: '„' '”';
&:before {
content: open-quote;
}
&:after {
content: close-quote;
}
}
.author {
color: #404040;
font-style: italic;
float: right;
} }
} }
} &[type=duckDuckGo-bang] {
&[type=duckDuckGo-bang] { order: 2;
order: 2; .bang-btn {
.bang-btn { width: 100%;
width: 100%; margin-top: 5px;
margin-top: 5px; color: #fff;
color: #fff; background-color: #286992;
background-color: #286992; font-size: 16px;
font-size: 16px; }
}
&[type=wikipedia] {
order: 3;
}
&[type=dictCC] {
order: 4;
}
&[type=tip] {
order: 5;
}
&[type=ad] {
order: 6;
} }
} }
&[type=wikipedia] { }
order: 3; \ No newline at end of file
}
&[type=dictCC] {
order: 4;
}
&[type=tip] {
order: 5;
}
&[type=ad] {
order: 6;
}
}
}
\ No newline at end of file
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
<i class="quicktip-extender fa fa-chevron-down"></i> <i class="quicktip-extender fa fa-chevron-down"></i>
</div> </div>
<p class="quicktip-description">{!! $quicktip->descr !!}</p> <p class="quicktip-description">{!! $quicktip->descr !!}</p>
@if ($quicktip->author != "")
<span class="author">{{ $quicktip->author }}</span>
@endif
</summary> </summary>
@foreach ($quicktip->details as $detail) @foreach ($quicktip->details as $detail)
<div class="quicktip-detail"> <div class="quicktip-detail">
...@@ -62,5 +65,8 @@ ...@@ -62,5 +65,8 @@
@endif @endif
</div> </div>
<p>{!! $quicktip->descr !!}</p> <p>{!! $quicktip->descr !!}</p>
@if ($quicktip->author != "")
<span class="author">{{ $quicktip->author }}</span>
@endif
</div> </div>
@endif @endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment