Posted in templates
3740
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
58
This Month
358
This Year
390

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
I believe that success can be measured in the number of uncomfortable conversations you're willing to have.
Unknown
Random CSS Property

translate3d()

The translate3d() CSS function repositions an element in 3D space. Its result is a <transform-function> data type.
translate3d() css reference