templates
Posted in
4822
12:53 am, October 8, 2021
bootstrap alert template
here is a templated bootstrap alert where you can switch the alert type with the @alert_type variable.
Here are the different alerts:
- primary
- secondary
- success
- danger
- warning
- info
- light
- dark
HTML
<!-- Alert Basic -->
<div class="alert alert-primary mb-3" role="alert">
A simple primary alert—check it out!
</div>
<!-- Alert in Templated Form -->
<!-- insert of the alert types into the @alert_type -->
<div class="alert alert-[@alert_type] mb-3" role="alert">
[@content]
</div>
PHP
/*
Alert Template
primary
secondary
success
danger
warning
info
light
dark
*/
$alert_template = new template("alert.html");
$alert_template->set("alert_type", "warning");
$alert_template->set("content", "Message");
$alert_html = $alert_template->output();
A simple primary alert—check it out!
[@content]
View Statistics
This Week
194
This Month
752
This Year
1472
Add Comment
Other Items in templates
Related Search Terms
Other Categories in Code
alpine js apps c css factorio font awesome images linux quick modals sqlite site bugs site updates slick slider sliders testing windows apps apache api apps asp bat bootstrap bootstrap templates charts cookies core css css filters css grid design elements docker domains emoji fancybox fonts foundation framework gimp git html icons ideas image formatting images javascript javascript functions jquery js linux mac misc modals mysql nginx node php php errors php function php functions php simple html dom pi400 python react regex sections simple_html_dom simplepie php site bugs site documentation slick slider sql sqlite ssh sublime svg svg css templates tools virtual box vscode vue webdev windows windows 11 windows commands wordpress