Posted in templates
3769
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();

View Statistics
This Week
63
This Month
261
This Year
419

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
The mind must be given relaxation; it will arise better and keener after resting. As rich fields must not be forced-for their productiveness, the have no rest, will quickly exhaust them constantlabor will break the vigor of the mind, but if it is released and relaxed a little while, it will recover its powers
Seneca
Random CSS Property

<number>

The <number> CSS data type represents a number, being either an integer or a number with a fractional component.
<number> css reference