Posted in templates
3744
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
62
This Month
362
This Year
394

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

is backupper a word?
anytrans
Random CSS Property

font-variant-alternates

The font-variant-alternates CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in @font-feature-values.
styleset() css reference