Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:webedition:beginners-guide:css-javascript

Dies ist eine alte Version des Dokuments!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Assets in templates ====== ===== Images ===== Images in Your templates are not supposed to be edited by Your users. Put them in a separate folder and probably protect this folder by only making it accessible to administrators. In the template code, use the we:img-tag with the document ID of the image (the ID appears when hovering over the document in the doctree): <code><we:img name="logo" id="1234" alt="Company logo"/></code> ===== CSS and JavaScript Files ===== In Your templates, You can link JavaScript and CSS files using standard HTML: <code> <script src="/link/to/script.js"></script> <link rel="stylesheet" href="/link/to.css"> </code> But it's way more elegant using the WE-tags we:css and we:js: <code> <we:js id="123" comment="main.js"/> <we:css id="456" comment="layout.css"/> </code> That way, You never have to worry about the files to be found, they're linked automatically, even when they're being moved. ==== Using a CSS Preprocessor ==== You can choose for CSS files to have them parsed by less, scss or sass -- just set the checkbox under "Properties" accordingly. They're saved under these file extensions (.less, .scss, .sass), but with the CSS-WE-tag from above, the parsed CSS version are generated and linked.

en/webedition/beginners-guide/css-javascript.1549642719.txt.bz2 · Zuletzt geändert: 2019/02/08 17:18 von Rudolf Horbas

Recent changes RSS feed