I'v created three websites with TYPO3 V7.6.x. All of them use fluid_styled_content extension. As setup for output I use 10.variables.content < styles.content.get and in template {content -> f:format.raw()}. Whit these all the output html code has lots of blank lines. For example:
<!--TYPO3SEARCH_begin-->
<div id="c26">
<h1>Fachstelle Gesundheitsförderung Uri</h1>
</div>
<div id="c14">
<div class="ce-textpic ce-left ce-above">
<div class="ce-bodytext">
<p><span class="lead-text">Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Dolores et ea rebum. Stet clita , no sea takimata.</span></p>
</div>
</div>
</div>
<div class="row link-box"><div class="col-sm-6"><img src="/fileadmin/_processed_/8/7/csm_teaser-1_f496539e13.jpg" width="720" height="375" class="img-responsive" alt="Gesundheitsförderung" ><div class="link-box-title"><h2>Gesundheitsförderung</h2></div></div><div class="col-sm-6"><img src="/fileadmin/_processed_/8/7/csm_teaser-1_f496539e13.jpg" width="720" height="375" class="img-responsive" alt="Cool & Clean" ><div class="link-box-title"><h2>Cool & Clean</h2></div></div><div class="col-sm-6"><img src="/fileadmin/_processed_/8/7/csm_teaser-1_f496539e13.jpg" width="720" height="375" class="img-responsive" alt="Verein" ><div class="link-box-title"><h2>Verein</h2></div></div><div class="col-sm-6 news-latest"><div class="link-box-description"><p>15. November 2016</p><h3>Projekt Ernährung</h3><p class="teaser">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et...</p></div><div class="link-box-title"><h2>News</h2></div></div></div>
<div id="c40">
<h2>Weitere Infos</h2>
<div class="ce-textpic ce-left ce-above">
<div class="ce-bodytext">
<p>NewsletterVeranstaltungenKontakt </p>
</div>
</div>
</div>
<!--TYPO3SEARCH_end-->
How can you remove the unneeded blank lines?
Thanks in advance
Daniel
As Dan already noted: use the f:spaceless VH.
Aside of that you could optimize all templates of your installation, but that is a very painful work as you need to work on a lot of templates. on the other side you will make all these templates unreadable as you loose the structure of indention.
A better approach would be to use extensions and external tools to optimize the resulting html. E.g. there is the extension tidy but that also needs the software tidy to be installed and accessible on your server. Then there are other minifier and compressor extensions.
A last (and possibly the easiest) optimization would be to configure your server (apache) to use compression / gzip for delivery. So those whitespace gets compressed to nearly nothing.
Related
My web site's links are not working.
My site : https://overlap.ulb.be/public/
When I click on a link, I have a 404 NOT FOUND (on any link)
If I click on the link "à propos" (about), I have this link :
https://overlap.ulb.be/about
We can see that I don't have anymore the public name in the URL.
This is a part of my code (routes)
Route::get('about', [PlanteController::class, 'about']);
and the controller code :
public function about()
{
return view('phyto.about' );
}
And the view's code :
<x-phyto-layout>
<style>
.h4-about-first {
margin: 0 0 10px 0;
}
.h4-about-m20 {
margin: 20px 0 10px 0;
}
.h4-about {
font-family: "Lato", Helvetica, Verdana, sans-serif;
/*font-family: "Arial Rounded MT Bold", Helvetica, Verdana, sans-serif;*/
font-weight: 500;
line-height: 120%;
padding: 0;
/*padding-left: 0px;*/
/*margin: 0 0 10px;*/
/*color: #413d3d;*/
color: rgba(0, 0, 0, 0.5);
}
.h4-about {
font-size: 22px;
}
.p-about {
font-family: "Lato", Helvetica, Verdana, sans-serif;
font-size: 14px;
font-weight: 300;
line-height: 24px;
color: #413d3d;
/*margin: 0 0 18px 0;*/
margin: 0 !important;
padding: 0;
/*padding-left: 0px;*/
}
</style>
<!-- About page container -->
<div class="page-container">
<div class="bloc bloc-fill-screen l-bloc" id="bloc-7">
<div class="container fill-bloc-top-edge">
<div class="row">
<div class="bloc l-bloc" id="bloc-13" style="">
<div class="container bloc-lg">
<div class="row">
<div class="col">
{{--<h3 style="font-size: 24px !important" class="mg-md h3-style">À propos de nous</h3>--}}
<h4 class="h4-about h4-about-first">À propos de nous</h4>
<p class="p-about" {{--style="color:black !important"--}}>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
</p>
{{--<h3 style="padding-top: 24px;font-size: 24px !important" class="mg-md h3-style">Projet Phyto ?</h3>--}}
<h4 class="h4-about h4-about-m20">Projet Phyto ?</h4>
<p class="p-about" {{--style="color:black !important"--}}>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
</p>
{{--<h3 style="padding-top: 24px;font-size: 24px !important" style="padding-top: 30px" class="mg-md h3-style">Collaborateurs</h3>--}}
<h4 class="h4-about h4-about-m20">Collaborateurs</h4>
<p class="p-about" {{--style="color:black !important"--}}>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium adipisci alias aliquid at aut ea
eligendi, enim esse ex excepturi in ipsam neque odio praesentium repellendus sed tenetur totam unde.
</p>
<h4 class="h4-about h4-about-m20">Nom latin</h4>
<p class="p-about" {{--style="color:black !important"--}}>
Le nom latin fait référence à la dernière classification (lien : www.derniere-classification.org)
</p>
<a href="/gpd?p=search" class="btn btn-lg btn-more-link-style btn-sq btn-golden-green float-lg-none mt-5">
Recherche de plantes
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- bloc-7 END -->
Thank you
{{--<div class="bloc none l-bloc" id="home-about">
<div class="container bloc-xl">
<div class="row">
<div class="col-md-2 order-md-1">
<img src="/images/valeriane_rouge.jpg" data-src="/images/valeriane_rouge.jpg" class="img-fluid mx-auto d-block lazyloaded">
</div>
<div class="col-md-2 align-self-center">
<h2 class="mg-md titulo01 h2-margin-bottom">Qu'est ce que ULB-PHYTO?</h2>
<p class="parrafo01">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus dicta error explicabo,
harum hic ipsam laboriosam molestiae nihil odit optio porro provident repellendus
saepe sed sequi similique velit vitae, voluptatem?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A accusantium amet delectus,
dicta dolor ea eligendi ex, excepturi facere
incidunt iste maiores porro possimus, qui rerum velit vitae voluptatem! Repudiandae.
</p>
</div>
</div>
</div>
</div>--}}
I also have a .htaccess :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
your issue was not loading your asset correctly. you can put the full URL of styles and javascript in your app layout including the public or you can use the asset function to generate a URL for an asset using the current scheme of the :
<link rel="stylesheet" type="text/css" href="{{asset('css/style.css')}}">
if you are using the asset method you should put the ASSET_URL variable in your .env file
ASSET_URL=https://overlap.ulb.be/public
UPDATED
if you mean images in your style you have two solutions, you can write inline style in your blade in this case you can use the asset method like the above example OR change all background URLs in the external style CSS file with
background-image: url("/public/images/...");
How can I add carousel without click handler using react-bootstrap
<Carousel></Carousel>
When you look into the documentation, you will find out, that a Carousel is working without any click handler per default: https://react-bootstrap.netlify.app/components/carousel/#example
Just define Carousel.Items or images directly and you are ready to go: the image will change every every 5 seconds:
<Carousel>
<Carousel.Item>
<img
className="d-block w-100"
src="holder.js/800x400?text=First slide&bg=373940"
alt="First slide"
/>
<Carousel.Caption>
<h3>First slide label</h3>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img
className="d-block w-100"
src="holder.js/800x400?text=Second slide&bg=282c34"
alt="Second slide"
/>
<Carousel.Caption>
<h3>Second slide label</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img
className="d-block w-100"
src="holder.js/800x400?text=Third slide&bg=20232a"
alt="Third slide"
/>
<Carousel.Caption>
<h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</Carousel.Caption>
</Carousel.Item>
</Carousel>
I'm trying to add swype support to my winjs applicaiton. It works great as long as the content has no scroll area. However as soon as the content overflows the page, the swype gestures don't work anymore.
If I set body { overflow-y: auto; } to hidden it works fine, but when there is a scrollbar, the swype gestures are not triggered anymore. Why?
Here is my sample:
<html>
<head>
<meta charset="utf-8" />
<title>PointerInput</title>
<link href="gestures.css" rel="stylesheet" />
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.touchSwipe.min.js"></script>
<link href="/css/ui-themed.css" rel="stylesheet" />
<link href="/css/default.css" rel="stylesheet" />
<style>
body {
overflow-y: auto;
}
</style>
<script>
$(function () {
$("body").swipe({
swipe: function (event, direction, distance, duration, fingerCount) {
$("#lastswype").text(direction);
}
});
});
</script>
</head>
<body>
<div class="TargetContainer" id="targetContainer">
<h1>Hello world</h1>
<h2>Last swype was: <span id="lastswype"></span></h2>
<div id="longText">
<p>
Lorem ipsum dolor sit amet, usu no illum petentium. Deterruisset definitiones reprehendunt eu mei. Cum falli volutpat at. Diceret splendide sed in. Sint noster deseruisse quo in. Vix nihil iisque dissentias at, harum facilis eu vel.
Pro eu dico decore consul. Ea posse incorrupte eam, ea affert verear dissentiunt eos. Mentitum intellegam at sit, stet repudiandae vel eu, sea error harum postea ut. Quod habeo tibique est an, vivendo salutatus pri an. Per tamquam tacimates in. Ut odio autem semper sed, cum ne quod aeterno praesent.
Ut oblique adversarium vis, et commodo discere eloquentiam eum, impetus tritani detracto ius ea. Ne sea expetenda deterruisset. Ea has populo ornatus feugait, assum voluptua interesset cum et. Mel ad aliquip periculis, ad eam vide altera splendide, alienum explicari ut mel. Qui laoreet tibique expetenda eu.
Mel nullam iuvaret ex, vix te tollit nullam. Illud quaestio reformidans cum et, et alia melius eam. Cum summo malorum ex. An decore nonumy appareat pro, alterum elaboraret concludaturque nec an. Ut vim aperiam oblique delectus. Duo et cibo labitur definiebas, ne affert rationibus sed, fuisset invenire vis ne.
Ad discere dolores accusata vix, aperiam vivendo cu vel, quo id nominavi dignissim temporibus. Nec summo democritum in, porro nominavi appareat nec cu. Similique ullamcorper vim ad, at epicuri phaedrum pri, est no alii facilis definitionem. Possim numquam et duo, quo an partem urbanitas, eu efficiendi scripserit vim. Ius putant dolores at, ut assum delenit definiebas sed. Tamquam fabellas sed at, ad ius quem affert nominavi, id elit oratio accusamus eam. Quando nostrum platonem vim ex, per ut tation nonumy assueverit.
Lorem ipsum dolor sit amet, usu no illum petentium. Deterruisset definitiones reprehendunt eu mei. Cum falli volutpat at. Diceret splendide sed in. Sint noster deseruisse quo in. Vix nihil iisque dissentias at, harum facilis eu vel.
Pro eu dico decore consul. Ea posse incorrupte eam, ea affert verear dissentiunt eos. Mentitum intellegam at sit, stet repudiandae vel eu, sea error harum postea ut. Quod habeo tibique est an, vivendo salutatus pri an. Per tamquam tacimates in. Ut odio autem semper sed, cum ne quod aeterno praesent.
Ut oblique adversarium vis, et commodo discere eloquentiam eum, impetus tritani detracto ius ea. Ne sea expetenda deterruisset. Ea has populo ornatus feugait, assum voluptua interesset cum et. Mel ad aliquip periculis, ad eam vide altera splendide, alienum explicari ut mel. Qui laoreet tibique expetenda eu.
Mel nullam iuvaret ex, vix te tollit nullam. Illud quaestio reformidans cum et, et alia melius eam. Cum summo malorum ex. An decore nonumy appareat pro, alterum elaboraret concludaturque nec an. Ut vim aperiam oblique delectus. Duo et cibo labitur definiebas, ne affert rationibus sed, fuisset invenire vis ne.
Ad discere dolores accusata vix, aperiam vivendo cu vel, quo id nominavi dignissim temporibus. Nec summo democritum in, porro nominavi appareat nec cu. Similique ullamcorper vim ad, at epicuri phaedrum pri, est no alii facilis definitionem. Possim numquam et duo, quo an partem urbanitas, eu efficiendi scripserit vim. Ius putant dolores at, ut assum delenit definiebas sed. Tamquam fabellas sed at, ad ius quem affert nominavi, id elit oratio accusamus eam. Quando nostrum platonem vim ex, per ut tation nonumy assueverit.
</p>
</div>
</div>
</body>
</html>
After some research, I found out that when an area has a scrolling area doesn't propergate touch events, if not specified otherwise. For eaxample, if an area has horzontal scrolling, I have to spezify, that vertical touch events are still allowed. This can be done with the touch-action property (http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx ).
This fixes my problem:
<style>
body {
overflow-y: auto;
touch-action: pan-x:
}
</style>
I've created a layout with Maqetta. Now I want to add the logic to the layout. Therefore I have downloaded the whole workspace from Maqetta and imported the files/libaries into a new Rails project. At first I had some problems, that Rails didn't loaded the dojo,js file, but I've solved that problem.
Now I have another problem. The page won't render. I've commented everything out except one widget (a button) and this works fine. But if I undo this, nothing happens. Unfortunately I also don't get any warnings/errors or anything like that from dojo.
After a little bit trying, I changed the parseOnLoad property and now I get a warning:
Unhandled Error: Tried to register widget with id==appLayout but that id is already registered
Here is the include tag:
<%= javascript_include_tag "lib/dojo/dojo/dojo", :'data-dojo-config' => "'async':true,
'packages':[{'name':'maqetta','location':'../../maqetta'},{'name':'gridx','location':'../gridx'},{'name':'clipart','location':'../../clipart'},{'name':'shapes','location':'../../shapes'},
{'name':'maqettaSamples','location':'../../../samples'},{'name':'zazl','location':'../../zazl'},{'name':'widgets','location':'../../custom'}]" %>
Here is the HTML part (I have simplified it, and now I'm just useing the example from the tutorial):
<body class="claro" data-maq-flow-layout="true" data-maq-ws="collapse" id="myapp" data-maq-appstates="{}">
<input type="button" data-dojo-type="dijit.form.Button" intermediateChanges="false" label="Search" iconClass="dijitNoIcon" onclick="alert('hi');"></input>
<div
id="appLayout" class="demoLayout"
data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design: 'headline'">
<div
class="centerPanel"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'center'">
<div>
<h4>Group 1 Content</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div>
<h4>Group 2 Content</h4>
</div>
<div>
<h4>Group 3 Content</h4>
</div>
</div>
<div
class="edgePanel"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'top'">Header content (top)</div>
<div
id="leftCol" class="edgePanel"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'left', splitter: true">Sidebar content (left)</div>
</div>
And here is the parser:
require(["dojo/parser","dojo/domReady!"], function(parser){
parser.parse();
});
I'm trying for hours now, and I'm still as clueless as at the beginning. Has somebody an idea what I can try?
Unhandled Error: Tried to register widget with id==appLayout but that id is already registered
This error is because you are parsing twice. Once on load and second in the require statement. The second parse will try registering a second widget with the same id, thus the error.
Remove one of the parsing calls and give the border container a specific width and height.
<div id="appLayout" class="demoLayout"
data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design: 'headline'"
style="width: 800px; height: 400px">
See http://livedocs.dojotoolkit.org/dijit/layout/BorderContainer#setting-sizes, the closest parent for which hasLayout is true (e.g. position:relative) must have a width+height set. Also, set width+height for BorderContainer.
I use this jquery plugin for "see more" text:
http://keith-wood.name/moreRef.html
I save from tinymce editor html text into mysql database. Then I display html text in a php page, and I use "see more" text jquery plugin for show only 100 words of text.
My problem is that that plugin doesn't retain html formatted text, but it changes html formatted text into simple text, it remove html tag.
How can I retain text with html tag for display formatting text properly and have also "see more" link?
You can do it with pure css and keep the html in place. Here is a JS fiddle (less and more will not be displayed on IE6,7,8 and the content will be expanded)
http://jsfiddle.net/6sj4e/45/
.text {
height: 50px;
overflow: hidden;
height: 100%\9;
}
input.less-more,
input.less-more:checked ~ label.more,
input.less-more:not(:checked) ~ label.less {
display: none;
}
and the html :
<input id="chbox" class="less-more" type="checkbox">
<div class="text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.</div>
<label for="chbox" class='more'>more</label>
<label for="chbox" class='less'>less</label>