Posted in templates
3729
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
79
This Month
347
This Year
379

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

james clear
Random CSS Property

column-rule-color

The column-rule-color CSS property sets the color of the line drawn between columns in a multi-column layout.
column-rule-color css reference