public function symbolicate() { $this->symbolicated_report = null; $this->symbolicator_error_message = null; if (is_post_request()) { $symbolicator = new Symbolicator($this->params['report'], 'tower1'); try { $this->symbolicated_report = $symbolicator->symbolicate(); } catch (Exception $e) { $this->symbolicator_error_message = markdown_to_html($e->getMessage()); } } }
/** * Converts a markdown string into HTML, then returns it with the editable area. * * @package Reditype * @subpackage helper * @param string $string * @param rtPage $object * @param bool $summary * @return string */ function editable_section($string, $object = null, $summary = false) { return editable_link($object) . markdown_to_html($string, $object, $summary); }
/** * Given text in a variety of format codings, this function returns * the text as safe HTML. * * This function should mainly be used for long strings like posts, * answers, glossary items etc. For short strings @see format_string(). * * <pre> * Options: * trusted : If true the string won't be cleaned. Default false required noclean=true. * noclean : If true the string won't be cleaned. Default false required trusted=true. * nocache : If true the strign will not be cached and will be formatted every call. Default false. * filter : If true the string will be run through applicable filters as well. Default true. * para : If true then the returned string will be wrapped in div tags. Default true. * newlines : If true then lines newline breaks will be converted to HTML newline breaks. Default true. * context : The context that will be used for filtering. * overflowdiv : If set to true the formatted text will be encased in a div * with the class no-overflow before being returned. Default false. * allowid : If true then id attributes will not be removed, even when * using htmlpurifier. Default false. * </pre> * * @todo Finish documenting this function * * @staticvar array $croncache * @param string $text The text to be formatted. This is raw text originally from user input. * @param int $format Identifier of the text format to be used * [FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_MARKDOWN] * @param object/array $options text formatting options * @param int $courseid_do_not_use deprecated course id, use context option instead * @return string */ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_do_not_use = NULL) { global $CFG, $COURSE, $DB, $PAGE; static $croncache = array(); if ($text === '' || is_null($text)) { return ''; // no need to do any filters and cleaning } $options = (array) $options; // detach object, we can not modify it if (!isset($options['trusted'])) { $options['trusted'] = false; } if (!isset($options['noclean'])) { if ($options['trusted'] and trusttext_active()) { // no cleaning if text trusted and noclean not specified $options['noclean'] = true; } else { $options['noclean'] = false; } } if (!isset($options['nocache'])) { $options['nocache'] = false; } if (!isset($options['filter'])) { $options['filter'] = true; } if (!isset($options['para'])) { $options['para'] = true; } if (!isset($options['newlines'])) { $options['newlines'] = true; } if (!isset($options['overflowdiv'])) { $options['overflowdiv'] = false; } // Calculate best context if (empty($CFG->version) or $CFG->version < 2010072800 or during_initial_install()) { // do not filter anything during installation or before upgrade completes $context = null; } else { if (isset($options['context'])) { // first by explicit passed context option if (is_object($options['context'])) { $context = $options['context']; } else { $context = get_context_instance_by_id($options['context']); } } else { if ($courseid_do_not_use) { // legacy courseid $context = get_context_instance(CONTEXT_COURSE, $courseid_do_not_use); } else { // fallback to $PAGE->context this may be problematic in CLI and other non-standard pages :-( $context = $PAGE->context; } } } if (!$context) { // either install/upgrade or something has gone really wrong because context does not exist (yet?) $options['nocache'] = true; $options['filter'] = false; } if ($options['filter']) { $filtermanager = filter_manager::instance(); } else { $filtermanager = new null_filter_manager(); } if (!empty($CFG->cachetext) and empty($options['nocache'])) { $hashstr = $text . '-' . $filtermanager->text_filtering_hash($context) . '-' . $context->id . '-' . current_language() . '-' . (int) $format . (int) $options['trusted'] . (int) $options['noclean'] . (int) $options['para'] . (int) $options['newlines']; $time = time() - $CFG->cachetext; $md5key = md5($hashstr); if (CLI_SCRIPT) { if (isset($croncache[$md5key])) { return $croncache[$md5key]; } } if ($oldcacheitem = $DB->get_record('cache_text', array('md5key' => $md5key), '*', IGNORE_MULTIPLE)) { if ($oldcacheitem->timemodified >= $time) { if (CLI_SCRIPT) { if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $oldcacheitem->formattedtext; } return $oldcacheitem->formattedtext; } } } switch ($format) { case FORMAT_HTML: if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_HTML, 'noclean' => $options['noclean'])); break; case FORMAT_PLAIN: $text = s($text); // cleans dangerous JS $text = rebuildnolinktag($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); break; case FORMAT_WIKI: // this format is deprecated $text = '<p>NOTICE: Wiki-like formatting has been removed from Moodle. You should not be seeing this message as all texts should have been converted to Markdown format instead. Please post a bug report to http://moodle.org/bugs with information about where you saw this message.</p>' . s($text); break; case FORMAT_MARKDOWN: $text = markdown_to_html($text); if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_MARKDOWN, 'noclean' => $options['noclean'])); break; default: // FORMAT_MOODLE or anything else $text = text_to_html($text, null, $options['para'], $options['newlines']); if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => $format, 'noclean' => $options['noclean'])); break; } if ($options['filter']) { // at this point there should not be any draftfile links any more, // this happens when developers forget to post process the text. // The only potential problem is that somebody might try to format // the text before storing into database which would be itself big bug. $text = str_replace("\"{$CFG->httpswwwroot}/draftfile.php", "\"{$CFG->httpswwwroot}/brokenfile.php#", $text); } // Warn people that we have removed this old mechanism, just in case they // were stupid enough to rely on it. if (isset($CFG->currenttextiscacheable)) { debugging('Once upon a time, Moodle had a truly evil use of global variables ' . 'called $CFG->currenttextiscacheable. The good news is that this no ' . 'longer exists. The bad news is that you seem to be using a filter that ' . 'relies on it. Please seek out and destroy that filter code.', DEBUG_DEVELOPER); } if (!empty($options['overflowdiv'])) { $text = html_writer::tag('div', $text, array('class' => 'no-overflow')); } if (empty($options['nocache']) and !empty($CFG->cachetext)) { if (CLI_SCRIPT) { // special static cron cache - no need to store it in db if its not already there if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $text; return $text; } $newcacheitem = new stdClass(); $newcacheitem->md5key = $md5key; $newcacheitem->formattedtext = $text; $newcacheitem->timemodified = time(); if ($oldcacheitem) { // See bug 4677 for discussion $newcacheitem->id = $oldcacheitem->id; try { $DB->update_record('cache_text', $newcacheitem); // Update existing record in the cache table } catch (dml_exception $e) { // It's unlikely that the cron cache cleaner could have // deleted this entry in the meantime, as it allows // some extra time to cover these cases. } } else { try { $DB->insert_record('cache_text', $newcacheitem); // Insert a new record in the cache table } catch (dml_exception $e) { // Again, it's possible that another user has caused this // record to be created already in the time that it took // to traverse this function. That's OK too, as the // call above handles duplicate entries, and eventually // the cron cleaner will delete them. } } } return $text; }
$newareaid = $manager->create_shared_area($method); $targetarea = get_grading_manager($newareaid); $targetcontroller = $targetarea->get_controller($method); $targetcontroller->update_definition($controller->get_definition_copy($targetcontroller)); $DB->set_field('grading_definitions', 'timecopied', time(), array('id' => $definition->id)); redirect(new moodle_url($PAGE->url, array('message' => get_string('manageactionsharedone', 'core_grading')))); } } // delete the form definition if (!empty($deleteform)) { $controller = $manager->get_controller($method); $definition = $controller->get_definition(); if (!$confirmed) { // let the user confirm they understand the consequences (also known as WTF-effect) echo $output->header(); echo $output->confirm(markdown_to_html(get_string('manageactiondeleteconfirm', 'core_grading', array('formname' => s($definition->name), 'component' => $manager->get_component_title(), 'area' => $manager->get_area_title()))), new moodle_url($PAGE->url, array('deleteform' => $deleteform, 'confirmed' => 1)), $PAGE->url); echo $output->footer(); die; } else { require_sesskey(); $controller->delete_definition(); redirect(new moodle_url($PAGE->url, array('message' => get_string('manageactiondeletedone', 'core_grading')))); } } echo $output->header(); if (!empty($message)) { echo $output->management_message($message); } echo $output->heading(get_string('gradingmanagementtitle', 'core_grading', array('component' => $manager->get_component_title(), 'area' => $manager->get_area_title()))); // display the active grading method information and selector echo $output->management_method_selector($manager, $PAGE->url);
$PAGE->set_pagelayout('admin'); // Check if we want to perform any actions. if ($action) { if ($action === 'delete') { if ($ltiplugin->can_delete_instance($instance)) { if ($confirm) { $ltiplugin->delete_instance($instance); redirect($PAGE->url); } $yesurl = new moodle_url('/enrol/lti/index.php', array('courseid' => $course->id, 'action' => 'delete', 'instanceid' => $instance->id, 'confirm' => 1, 'sesskey' => sesskey())); $displayname = $ltiplugin->get_instance_name($instance); $users = $DB->count_records('user_enrolments', array('enrolid' => $instance->id)); if ($users) { $message = markdown_to_html(get_string('deleteinstanceconfirm', 'enrol', array('name' => $displayname, 'users' => $users))); } else { $message = markdown_to_html(get_string('deleteinstancenousersconfirm', 'enrol', array('name' => $displayname))); } echo $OUTPUT->header(); echo $OUTPUT->confirm($message, $yesurl, $PAGE->url); echo $OUTPUT->footer(); die; } } else { if ($action === 'disable') { if ($ltiplugin->can_hide_show_instance($instance)) { if ($instance->status != ENROL_INSTANCE_DISABLED) { $ltiplugin->update_status($instance, ENROL_INSTANCE_DISABLED); redirect($PAGE->url); } } } else {
/** * Given text in a variety of format codings, this function returns the text as safe HTML. * * This function should mainly be used for long strings like posts, * answers, glossary items etc. For short strings {@link format_string()}. * * <pre> * Options: * trusted : If true the string won't be cleaned. Default false required noclean=true. * noclean : If true the string won't be cleaned. Default false required trusted=true. * nocache : If true the strign will not be cached and will be formatted every call. Default false. * filter : If true the string will be run through applicable filters as well. Default true. * para : If true then the returned string will be wrapped in div tags. Default true. * newlines : If true then lines newline breaks will be converted to HTML newline breaks. Default true. * context : The context that will be used for filtering. * overflowdiv : If set to true the formatted text will be encased in a div * with the class no-overflow before being returned. Default false. * allowid : If true then id attributes will not be removed, even when * using htmlpurifier. Default false. * </pre> * * @staticvar array $croncache * @param string $text The text to be formatted. This is raw text originally from user input. * @param int $format Identifier of the text format to be used * [FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_MARKDOWN] * @param object/array $options text formatting options * @param int $courseiddonotuse deprecated course id, use context option instead * @return string */ function format_text($text, $format = FORMAT_MOODLE, $options = null, $courseiddonotuse = null) { global $CFG, $DB, $PAGE; if ($text === '' || is_null($text)) { // No need to do any filters and cleaning. return ''; } // Detach object, we can not modify it. $options = (array) $options; if (!isset($options['trusted'])) { $options['trusted'] = false; } if (!isset($options['noclean'])) { if ($options['trusted'] and trusttext_active()) { // No cleaning if text trusted and noclean not specified. $options['noclean'] = true; } else { $options['noclean'] = false; } } if (!isset($options['nocache'])) { $options['nocache'] = false; } if (!isset($options['filter'])) { $options['filter'] = true; } if (!isset($options['para'])) { $options['para'] = true; } if (!isset($options['newlines'])) { $options['newlines'] = true; } if (!isset($options['overflowdiv'])) { $options['overflowdiv'] = false; } // Calculate best context. if (empty($CFG->version) or $CFG->version < 2013051400 or during_initial_install()) { // Do not filter anything during installation or before upgrade completes. $context = null; } else { if (isset($options['context'])) { // First by explicit passed context option. if (is_object($options['context'])) { $context = $options['context']; } else { $context = context::instance_by_id($options['context']); } } else { if ($courseiddonotuse) { // Legacy courseid. $context = context_course::instance($courseiddonotuse); } else { // Fallback to $PAGE->context this may be problematic in CLI and other non-standard pages :-(. $context = $PAGE->context; } } } if (!$context) { // Either install/upgrade or something has gone really wrong because context does not exist (yet?). $options['nocache'] = true; $options['filter'] = false; } if ($options['filter']) { $filtermanager = filter_manager::instance(); $filtermanager->setup_page_for_filters($PAGE, $context); // Setup global stuff filters may have. } else { $filtermanager = new null_filter_manager(); } switch ($format) { case FORMAT_HTML: if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_HTML, 'noclean' => $options['noclean'])); break; case FORMAT_PLAIN: $text = s($text); // Cleans dangerous JS. $text = rebuildnolinktag($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); break; case FORMAT_WIKI: // This format is deprecated. $text = '<p>NOTICE: Wiki-like formatting has been removed from Moodle. You should not be seeing this message as all texts should have been converted to Markdown format instead. Please post a bug report to http://moodle.org/bugs with information about where you saw this message.</p>' . s($text); break; case FORMAT_MARKDOWN: $text = markdown_to_html($text); if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => FORMAT_MARKDOWN, 'noclean' => $options['noclean'])); break; default: // FORMAT_MOODLE or anything else. $text = text_to_html($text, null, $options['para'], $options['newlines']); if (!$options['noclean']) { $text = clean_text($text, FORMAT_HTML, $options); } $text = $filtermanager->filter_text($text, $context, array('originalformat' => $format, 'noclean' => $options['noclean'])); break; } if ($options['filter']) { // At this point there should not be any draftfile links any more, // this happens when developers forget to post process the text. // The only potential problem is that somebody might try to format // the text before storing into database which would be itself big bug.. $text = str_replace("\"{$CFG->httpswwwroot}/draftfile.php", "\"{$CFG->httpswwwroot}/brokenfile.php#", $text); if ($CFG->debugdeveloper) { if (strpos($text, '@@PLUGINFILE@@/') !== false) { debugging('Before calling format_text(), the content must be processed with file_rewrite_pluginfile_urls()', DEBUG_DEVELOPER); } } } if (!empty($options['overflowdiv'])) { $text = html_writer::tag('div', $text, array('class' => 'no-overflow')); } return $text; }
/** * Creates course enrol form, checks if form submitted * and enrols user if necessary. It can also redirect. * * @param stdClass $instance * @return string html text, usually a form in a text box */ public function enrol_page_hook(stdClass $instance) { global $CFG, $OUTPUT, $SESSION, $USER, $DB; if (isguestuser()) { // Can not enrol guest!! return null; } if ($DB->record_exists('user_enrolments', array('userid' => $USER->id, 'enrolid' => $instance->id))) { //TODO: maybe we should tell them they are already enrolled, but can not access the course return null; } if ($instance->enrolstartdate != 0 and $instance->enrolstartdate > time()) { //TODO: inform that we can not enrol yet return null; } if ($instance->enrolenddate != 0 and $instance->enrolenddate < time()) { //TODO: inform that enrolment is not possible any more return null; } if ($instance->customint5) { require_once "{$CFG->dirroot}/cohort/lib.php"; if (!cohort_is_member($instance->customint5, $USER->id)) { $cohort = $DB->get_record('cohort', array('id' => $instance->customint5)); if (!$cohort) { return null; } $a = format_string($cohort->name, true, array('context' => context::instance_by_id($cohort->contextid))); return $OUTPUT->box(markdown_to_html(get_string('cohortnonmemberinfo', 'enrol_self', $a))); } } require_once "{$CFG->dirroot}/enrol/self/locallib.php"; require_once "{$CFG->dirroot}/group/lib.php"; $form = new enrol_self_enrol_form(NULL, $instance); $instanceid = optional_param('instance', 0, PARAM_INT); if ($instance->id == $instanceid) { if ($data = $form->get_data()) { $enrol = enrol_get_plugin('self'); $timestart = time(); if ($instance->enrolperiod) { $timeend = $timestart + $instance->enrolperiod; } else { $timeend = 0; } $this->enrol_user($instance, $USER->id, $instance->roleid, $timestart, $timeend); add_to_log($instance->courseid, 'course', 'enrol', '../enrol/users.php?id=' . $instance->courseid, $instance->courseid); //TODO: There should be userid somewhere! if ($instance->password and $instance->customint1 and $data->enrolpassword !== $instance->password) { // it must be a group enrolment, let's assign group too $groups = $DB->get_records('groups', array('courseid' => $instance->courseid), 'id', 'id, enrolmentkey'); foreach ($groups as $group) { if (empty($group->enrolmentkey)) { continue; } if ($group->enrolmentkey === $data->enrolpassword) { groups_add_member($group->id, $USER->id); break; } } } // Send welcome message. if ($instance->customint4) { $this->email_welcome_message($instance, $USER); } } } ob_start(); $form->display(); $output = ob_get_clean(); return $OUTPUT->box($output); }
/** * Notify person responsible for enrolments that some user enrolments will be expired soon, * it is called only if notification of enrollers (aka teachers) is enabled in course. * * This is called repeatedly every day for each course if there are any pending expiration * in the expiration threshold. * * @param int $eid * @param array $users * @param bool $verbose */ protected function notify_expiry_enroller($eid, $users, $verbose) { global $DB, $SESSION; $name = $this->get_name(); $instance = $DB->get_record('enrol', array('id' => $eid, 'enrol' => $name)); $context = context_course::instance($instance->courseid); $course = $DB->get_record('course', array('id' => $instance->courseid)); $enroller = $this->get_enroller($instance->id); $admin = get_admin(); // Some nasty hackery to get strings and dates localised for target user. $sessionlang = isset($SESSION->lang) ? $SESSION->lang : null; if (get_string_manager()->translation_exists($enroller->lang, false)) { $SESSION->lang = $enroller->lang; moodle_setlocale(); } foreach ($users as $key => $info) { $users[$key] = '* ' . $info['fullname'] . ' - ' . userdate($info['timeend'], '', $enroller->timezone); } $a = new stdClass(); $a->course = format_string($course->fullname, true, array('context' => $context)); $a->threshold = get_string('numdays', '', $instance->expirythreshold / (60 * 60 * 24)); $a->users = implode("\n", $users); $a->extendurl = (string) new moodle_url('/enrol/users.php', array('id' => $instance->courseid)); $subject = get_string('expirymessageenrollersubject', 'enrol_' . $name, $a); $body = get_string('expirymessageenrollerbody', 'enrol_' . $name, $a); $message = new stdClass(); $message->notification = 1; $message->component = 'enrol_' . $name; $message->name = 'expiry_notification'; $message->userfrom = $admin; $message->userto = $enroller; $message->subject = $subject; $message->fullmessage = $body; $message->fullmessageformat = FORMAT_MARKDOWN; $message->fullmessagehtml = markdown_to_html($body); $message->smallmessage = $subject; $message->contexturlname = $a->course; $message->contexturl = $a->extendurl; if (message_send($message)) { if ($verbose) { mtrace(" notifying user {$enroller->id} about all expiring {$name} enrolments in course {$instance->courseid}"); } } else { if ($verbose) { mtrace(" error notifying user {$enroller->id} about all expiring {$name} enrolments in course {$instance->courseid}"); } } if ($SESSION->lang !== $sessionlang) { $SESSION->lang = $sessionlang; moodle_setlocale(); } }
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with local_nagios. If not, see <http://www.gnu.org/licenses/>. // // Author: Michael Aherne // Copyright 2014 University of Strathclyde require_once '../../config.php'; require_once $CFG->libdir . '/adminlib.php'; require_login(SITEID); require_capability('moodle/site:config', context_system::instance()); admin_externalpage_setup('local_nagios'); $PAGE->set_context(context_system::instance()); $PAGE->set_url('/local/nagios/admin.php'); $PAGE->set_pagelayout('standard'); $PAGE->set_pagetype('admin'); $PAGE->set_heading("Nagios services"); $PAGE->navbar->add("Nagios services"); $action = optional_param('action', 'servicelist', PARAM_TEXT); $out = $PAGE->get_renderer('local_nagios'); if ($action == 'servicelist') { $servicelist = \local_nagios\service::service_list(); echo $OUTPUT->header(); echo $OUTPUT->heading("Nagios services"); echo $out->render_servicelist($servicelist); echo $OUTPUT->box(markdown_to_html(get_string('servicelist_help', 'local_nagios'))); echo $OUTPUT->footer(); } else { die("Unknown action"); }
use_helper('I18N', 'Date', 'rtText'); ?> <div class="rt-section rt-wiki-page"> <div class="rt-section-tools-header rt-admin-tools"> <?php echo link_to(__('Edit Page'), 'rtWikiPageAdmin/edit?id=' . $rt_wiki_page->getId(), array('class' => 'rt-admin-edit-tools-trigger')); ?> </div> <?php if (sfConfig::get('app_rt_templates_headers_embedded', true)) { ?> <div class="rt-section-header"> <h1><?php echo $rt_wiki_page->getTitle(); ?> </h1> </div> <?php } ?> <div class="rt-section-content"> <?php echo markdown_to_html($rt_wiki_page->getContent(), $rt_wiki_page); ?> </div> </div>
// // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * PHPUnit info * * @package tool_phpunit * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define('NO_OUTPUT_BUFFERING', true); require dirname(__FILE__) . '/../../../config.php'; require_once $CFG->libdir . '/adminlib.php'; admin_externalpage_setup('toolphpunit'); echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('pluginname', 'tool_phpunit')); echo $OUTPUT->box_start(); $info = file_get_contents("{$CFG->libdir}/phpunit/readme.md"); echo markdown_to_html($info); echo $OUTPUT->box_end(); echo $OUTPUT->footer();
* MS Excel Viewer 2003 (with Compatibility Pack), 2010 * LibreOffice 3.5, 3.6 * NeoOffice 3.3 * Apple Numbers \'09 (2.3) and Preview * Google Drive spreadsheet import * IBM Lotus Symphony 3.0.1 * Gnumeric 1.11 * Calligra Suite 2.4, 2.5 Known problems: * Excel 2007 borders appear too thick in LibreOffice * Excel 2007 can not be opened in Calligra Suite '; echo markdown_to_html($notes); echo $OUTPUT->box_end(); echo $OUTPUT->single_button(new moodle_url($PAGE->url, array('type' => 'excel2007')), 'Test Excel 2007 format'); echo $OUTPUT->single_button(new moodle_url($PAGE->url, array('type' => 'ods')), 'Test ODS format'); echo $OUTPUT->footer(); die; } if ($type === 'excel2007') { $workbook = new MoodleExcelWorkbook('moodletest.xlsx', 'Excel2007'); } else { if ($type === 'ods') { $workbook = new MoodleODSWorkbook('moodletest.ods'); } } $worksheet = array(); $worksheet = $workbook->add_worksheet('Supported');
$PAGE->set_pagelayout('incourse'); echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('switchroleto')); // Overall criteria aggregation. $roles = array(); $assumedrole = -1; if (is_role_switched($course->id)) { $roles[0] = get_string('switchrolereturn'); $assumedrole = $USER->access['rsw'][$context->path]; } $availableroles = get_switchable_roles($context); if (is_array($availableroles)) { foreach ($availableroles as $key => $role) { if ($assumedrole == (int) $key) { continue; } $roles[$key] = $role; } } echo $OUTPUT->box(markdown_to_html(get_string('switchroleto_help'))); foreach ($roles as $key => $role) { $url = new moodle_url('/course/switchrole.php', array('id' => $id, 'switchrole' => $key, 'returnurl' => $returnurl)); echo $OUTPUT->container($OUTPUT->single_button($url, $role), 'm-x-3 m-b-1'); } $url = new moodle_url($returnurl); echo $OUTPUT->container($OUTPUT->action_link($url, get_string('cancel')), 'm-x-3 m-b-1'); echo $OUTPUT->footer(); exit; } } redirect($returnurl);
} div.shout p, div.shout li { font-size: 150%; font-weight: bold; } .row { *zoom: 1; } .row:before, .row:after { content: ""; display: table; } .row:after { clear: both; } </style> </head> <body> <!--[if lt IE 7]> <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p> <![endif]--> <div class="rt-container"> <div class="rt-container-inner row"> <?php use_helper('rtText'); echo markdown_to_html($sf_request->getParameter('data'), $object); ?> <div class="clearfix"></div> </div> </div> </body> </html>
} else { $message = markdown_to_html(get_string('deleteinstancenousersconfirm', 'enrol', array('name'=>$displayname))); } echo $OUTPUT->confirm($message, $yesurl, $PAGE->url); echo $OUTPUT->footer(); die(); } else if ($action === 'disable') { $instance = $instances[$instanceid]; $plugin = $plugins[$instance->enrol]; if ($instance->status != ENROL_INSTANCE_DISABLED) { if (enrol_accessing_via_instance($instance)) { if (!$confirm2) { $yesurl = new moodle_url('/enrol/instances.php', array('id'=>$course->id, 'action'=>'disable', 'instance'=>$instance->id, 'confirm2'=>1, 'sesskey'=>sesskey())); $displayname = $plugin->get_instance_name($instance); $message = markdown_to_html(get_string('disableinstanceconfirmself', 'enrol', array('name'=>$displayname))); echo $OUTPUT->header(); echo $OUTPUT->confirm($message, $yesurl, $PAGE->url); echo $OUTPUT->footer(); die(); } } $plugin->update_status($instance, ENROL_INSTANCE_DISABLED); redirect($PAGE->url); } } else if ($action === 'enable') { $instance = $instances[$instanceid]; $plugin = $plugins[$instance->enrol]; if ($instance->status != ENROL_INSTANCE_ENABLED) { $plugin->update_status($instance, ENROL_INSTANCE_ENABLED);
/** * Converts content introduced in an editor to plain text. * * @param string $content The text as entered by the user * @param int $contentformat The text format: FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN or FORMAT_MARKDOWN * @return string Plain text. */ function content_to_text($content, $contentformat) { switch ($contentformat) { case FORMAT_PLAIN: return $content; case FORMAT_MARKDOWN: $html = markdown_to_html($content); return html_to_text($html, 75, false); default: // FORMAT_HTML and FORMAT_MOODLE. return html_to_text($content, 75, false); } }
/** * Given text in a variety of format codings, this function returns * the text as safe HTML. * * This function should mainly be used for long strings like posts, * answers, glossary items etc. For short strings @see format_string(). * * @uses $CFG * @uses FORMAT_MOODLE * @uses FORMAT_HTML * @uses FORMAT_PLAIN * @uses FORMAT_WIKI * @uses FORMAT_MARKDOWN * @param string $text The text to be formatted. This is raw text originally from user input. * @param int $format Identifier of the text format to be used * (FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_WIKI, FORMAT_MARKDOWN) * @param array $options ? * @param int $courseid ? * @return string * @todo Finish documenting this function */ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid = NULL) { global $CFG, $COURSE; static $croncache = array(); if ($text === '') { return ''; // no need to do any filters and cleaning } if (!isset($options->trusttext)) { $options->trusttext = false; } if (!isset($options->noclean)) { $options->noclean = false; } if (!isset($options->nocache)) { $options->nocache = false; } if (!isset($options->smiley)) { $options->smiley = true; } if (!isset($options->filter)) { $options->filter = true; } if (!isset($options->para)) { $options->para = true; } if (!isset($options->newlines)) { $options->newlines = true; } if (empty($courseid)) { $courseid = $COURSE->id; } if (!empty($CFG->cachetext) and empty($options->nocache)) { $time = time() - $CFG->cachetext; $md5key = md5($text . '-' . (int) $courseid . '-' . current_language() . '-' . (int) $format . (int) $options->trusttext . (int) $options->noclean . (int) $options->smiley . (int) $options->filter . (int) $options->para . (int) $options->newlines); if (defined('FULLME') and FULLME == 'cron') { if (isset($croncache[$md5key])) { return $croncache[$md5key]; } } if ($oldcacheitem = get_record_sql('SELECT * FROM ' . $CFG->prefix . 'cache_text WHERE md5key = \'' . $md5key . '\'', true)) { if ($oldcacheitem->timemodified >= $time) { if (defined('FULLME') and FULLME == 'cron') { if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $oldcacheitem->formattedtext; } return $oldcacheitem->formattedtext; } } } // trusttext overrides the noclean option! if ($options->trusttext) { if (trusttext_present($text)) { $text = trusttext_strip($text); if (!empty($CFG->enabletrusttext)) { $options->noclean = true; } else { $options->noclean = false; } } else { $options->noclean = false; } } else { if (!debugging('', DEBUG_DEVELOPER)) { // strip any forgotten trusttext in non-developer mode // do not forget to disable text cache when debugging trusttext!! $text = trusttext_strip($text); } } $CFG->currenttextiscacheable = true; // Default status - can be changed by any filter switch ($format) { case FORMAT_HTML: if ($options->smiley) { replace_smilies($text); } if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { $text = filter_text($text, $courseid); } break; case FORMAT_PLAIN: $text = s($text); // cleans dangerous JS $text = rebuildnolinktag($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); break; case FORMAT_WIKI: // this format is deprecated $text = '<p>NOTICE: Wiki-like formatting has been removed from Moodle. You should not be seeing this message as all texts should have been converted to Markdown format instead. Please post a bug report to http://moodle.org/bugs with information about where you saw this message.</p>' . s($text); break; case FORMAT_MARKDOWN: $text = markdown_to_html($text); if ($options->smiley) { replace_smilies($text); } if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { $text = filter_text($text, $courseid); } break; default: // FORMAT_MOODLE or anything else $text = text_to_html($text, $options->smiley, $options->para, $options->newlines); if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } if ($options->filter) { $text = filter_text($text, $courseid); } break; } if (empty($options->nocache) and !empty($CFG->cachetext) and $CFG->currenttextiscacheable) { if (defined('FULLME') and FULLME == 'cron') { // special static cron cache - no need to store it in db if its not already there if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $text; return $text; } $newcacheitem = new object(); $newcacheitem->md5key = $md5key; $newcacheitem->formattedtext = addslashes($text); $newcacheitem->timemodified = time(); if ($oldcacheitem) { // See bug 4677 for discussion $newcacheitem->id = $oldcacheitem->id; @update_record('cache_text', $newcacheitem); // Update existing record in the cache table // It's unlikely that the cron cache cleaner could have // deleted this entry in the meantime, as it allows // some extra time to cover these cases. } else { @insert_record('cache_text', $newcacheitem); // Insert a new record in the cache table // Again, it's possible that another user has caused this // record to be created already in the time that it took // to traverse this function. That's OK too, as the // call above handles duplicate entries, and eventually // the cron cleaner will delete them. } } return $text; }
public function test_links() { $text = "some [example link](http://example.com/)"; $result = "<p>some <a href=\"http://example.com/\">example link</a></p>\n"; $this->assertEquals($result, markdown_to_html($text)); }
/** * Converts texts or strings to plain text. * * - When used to convert user input introduced in an editor the text format needs to be passed in $contentformat like we usually * do in format_text. * - When this function is used for strings that are usually passed through format_string before displaying them * we need to set $contentformat to false. This will execute html_to_text as these strings can contain multilang tags if * multilang filter is applied to headings. * * @param string $content The text as entered by the user * @param int|false $contentformat False for strings or the text format: FORMAT_MOODLE/FORMAT_HTML/FORMAT_PLAIN/FORMAT_MARKDOWN * @return string Plain text. */ function content_to_text($content, $contentformat) { switch ($contentformat) { case FORMAT_PLAIN: // Nothing here. break; case FORMAT_MARKDOWN: $content = markdown_to_html($content); $content = html_to_text($content, 75, false); break; default: // FORMAT_HTML, FORMAT_MOODLE and $contentformat = false, the later one are strings usually formatted through // format_string, we need to convert them from html because they can contain HTML (multilang filter). $content = html_to_text($content, 75, false); } return trim($content, "\r\n "); }
/** * Returns an HTML string * @return string Returns an HTML string */ public function output_html($data, $query='') { global $OUTPUT; $context = new stdClass(); $context->title = $this->visiblename; $context->description = $this->description; $context->descriptionformatted = highlight($query, markdown_to_html($this->description)); return $OUTPUT->render_from_template('core_admin/setting_heading', $context); }
/** * Given text in a variety of format codings, this function returns * the text as safe HTML. * * This function should mainly be used for long strings like posts, * answers, glossary items etc. For short strings @see format_string(). * * @uses $CFG * @uses FORMAT_MOODLE * @uses FORMAT_HTML * @uses FORMAT_PLAIN * @uses FORMAT_WIKI * @uses FORMAT_MARKDOWN * @param string $text The text to be formatted. This is raw text originally from user input. * @param int $format Identifier of the text format to be used * (FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_WIKI, FORMAT_MARKDOWN) * @param array $options ? * @param int $courseid ? * @return string * @todo Finish documenting this function */ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid = NULL) { global $CFG, $COURSE, $DB, $PAGE; static $croncache = array(); $hashstr = ''; if ($text === '') { return ''; // no need to do any filters and cleaning } if (!isset($options->trusted)) { $options->trusted = false; } if (!isset($options->noclean)) { if ($options->trusted and trusttext_active()) { // no cleaning if text trusted and noclean not specified $options->noclean = true; } else { $options->noclean = false; } } if (!isset($options->nocache)) { $options->nocache = false; } if (!isset($options->smiley)) { $options->smiley = true; } if (!isset($options->filter)) { $options->filter = true; } if (!isset($options->para)) { $options->para = true; } if (!isset($options->newlines)) { $options->newlines = true; } if (empty($courseid)) { $courseid = $COURSE->id; } if ($options->filter) { $filtermanager = filter_manager::instance(); } else { $filtermanager = new null_filter_manager(); } $context = $PAGE->context; if (!empty($CFG->cachetext) and empty($options->nocache)) { $hashstr .= $text . '-' . $filtermanager->text_filtering_hash($context, $courseid) . '-' . (int) $courseid . '-' . current_language() . '-' . (int) $format . (int) $options->trusted . (int) $options->noclean . (int) $options->smiley . (int) $options->filter . (int) $options->para . (int) $options->newlines; $time = time() - $CFG->cachetext; $md5key = md5($hashstr); if (CLI_SCRIPT) { if (isset($croncache[$md5key])) { return $croncache[$md5key]; } } if ($oldcacheitem = $DB->get_record('cache_text', array('md5key' => $md5key), '*', true)) { if ($oldcacheitem->timemodified >= $time) { if (CLI_SCRIPT) { if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $oldcacheitem->formattedtext; } return $oldcacheitem->formattedtext; } } } switch ($format) { case FORMAT_HTML: if ($options->smiley) { replace_smilies($text); } if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } $text = $filtermanager->filter_text($text, $context, $courseid); break; case FORMAT_PLAIN: $text = s($text); // cleans dangerous JS $text = rebuildnolinktag($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); break; case FORMAT_WIKI: // this format is deprecated $text = '<p>NOTICE: Wiki-like formatting has been removed from Moodle. You should not be seeing this message as all texts should have been converted to Markdown format instead. Please post a bug report to http://moodle.org/bugs with information about where you saw this message.</p>' . s($text); break; case FORMAT_MARKDOWN: $text = markdown_to_html($text); if ($options->smiley) { replace_smilies($text); } if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } $text = $filtermanager->filter_text($text, $context, $courseid); break; default: // FORMAT_MOODLE or anything else $text = text_to_html($text, $options->smiley, $options->para, $options->newlines); if (!$options->noclean) { $text = clean_text($text, FORMAT_HTML); } $text = $filtermanager->filter_text($text, $context, $courseid); break; } // Warn people that we have removed this old mechanism, just in case they // were stupid enough to rely on it. if (isset($CFG->currenttextiscacheable)) { debugging('Once upon a time, Moodle had a truly evil use of global variables ' . 'called $CFG->currenttextiscacheable. The good news is that this no ' . 'longer exists. The bad news is that you seem to be using a filter that ' . 'relies on it. Please seek out and destroy that filter code.', DEBUG_DEVELOPER); } if (empty($options->nocache) and !empty($CFG->cachetext)) { if (CLI_SCRIPT) { // special static cron cache - no need to store it in db if its not already there if (count($croncache) > 150) { reset($croncache); $key = key($croncache); unset($croncache[$key]); } $croncache[$md5key] = $text; return $text; } $newcacheitem = new object(); $newcacheitem->md5key = $md5key; $newcacheitem->formattedtext = $text; $newcacheitem->timemodified = time(); if ($oldcacheitem) { // See bug 4677 for discussion $newcacheitem->id = $oldcacheitem->id; try { $DB->update_record('cache_text', $newcacheitem); // Update existing record in the cache table } catch (dml_exception $e) { // It's unlikely that the cron cache cleaner could have // deleted this entry in the meantime, as it allows // some extra time to cover these cases. } } else { try { $DB->insert_record('cache_text', $newcacheitem); // Insert a new record in the cache table } catch (dml_exception $e) { // Again, it's possible that another user has caused this // record to be created already in the time that it took // to traverse this function. That's OK too, as the // call above handles duplicate entries, and eventually // the cron cleaner will delete them. } } } return $text; }
function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid = NULL) { global $CFG, $course; if (!isset($options->noclean)) { $options->noclean = false; } if (!isset($options->smiley)) { $options->smiley = true; } if (!isset($options->filter)) { $options->filter = true; } if (!isset($options->para)) { $options->para = true; } if (!isset($options->newlines)) { $options->newlines = true; } if (empty($courseid)) { if (!empty($course->id)) { // An ugly hack for better compatibility $courseid = $course->id; } } /* if (!empty($CFG->cachetext)) { $time = time() - $CFG->cachetext; $md5key = md5($text.'-'.$courseid.$options->noclean.$options->smiley.$options->filter.$options->para.$options->newlines); if ($cacheitem = get_record_select('cache_text', "md5key = '$md5key' AND timemodified > '$time'")) { return $cacheitem->formattedtext; } } */ // DISABLED - there is no cache_text - Penny $CFG->currenttextiscacheable = true; // Default status - can be changed by any filter switch ($format) { case FORMAT_HTML: if (!empty($options->smiley)) { replace_smilies($text); } if (!isset($options->noclean)) { $text = clean_text($text, $format, !empty($options->cleanuserfile)); } if (!empty($options->filter)) { $text = filter_text($text, $courseid); } break; case FORMAT_PLAIN: $text = s($text); $text = rebuildnolinktag($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); break; case FORMAT_WIKI: // this format is deprecated $text = '<p>NOTICE: Wiki-like formatting has been removed from Moodle. You should not be seeing this message as all texts should have been converted to Markdown format instead. Please post a bug report to http://moodle.org/bugs with information about where you saw this message.</p>' . s($text); break; case FORMAT_MARKDOWN: $text = markdown_to_html($text); if (!empty($options->smiley)) { replace_smilies($text); } if (empty($options->noclean)) { $text = clean_text($text, $format); } if (!empty($options->filter)) { $text = filter_text($text, $courseid); } break; default: // FORMAT_MOODLE or anything else $text = text_to_html($text, $options->smiley, $options->para, $options->newlines); if (empty($options->noclean)) { $text = clean_text($text, $format); } if (!empty($options->filter)) { $text = filter_text($text, $courseid); } break; } if (!empty($CFG->cachetext) and $CFG->currenttextiscacheable) { $newrecord->md5key = $md5key; $newrecord->formattedtext = $text; $newrecord->timemodified = time(); @insert_record('cache_text', $newrecord); } return $text; }
/** * Convert some content to HTML. * @param string $text the content to convert to HTML * @param int $oldformat One of the FORMAT_... constants. */ function qtype_essay_convert_to_html($text, $oldformat) { switch ($oldformat) { // Similar to format_text. case FORMAT_PLAIN: $text = s($text); $text = str_replace(' ', ' ', $text); $text = nl2br($text); return $text; case FORMAT_MARKDOWN: return markdown_to_html($text); case FORMAT_MOODLE: return text_to_html($text); case FORMAT_HTML: return $text; default: throw new coding_exception( 'Unexpected text format when upgrading essay questions.'); } }
/** * Notify person responsible for enrolments that some user enrolments will be expired soon, * it is called only if notification of enrollers (aka teachers) is enabled in course. * * This is called repeatedly every day for each course if there are any pending expiration * in the expiration threshold. * * @param int $eid * @param array $users * @param progress_trace $trace */ protected function notify_expiry_enroller($eid, $users, progress_trace $trace) { global $DB; $name = $this->get_name(); $instance = $DB->get_record('enrol', array('id'=>$eid, 'enrol'=>$name)); $context = context_course::instance($instance->courseid); $course = $DB->get_record('course', array('id'=>$instance->courseid)); $enroller = $this->get_enroller($instance->id); $admin = get_admin(); $oldforcelang = force_current_language($enroller->lang); foreach($users as $key=>$info) { $users[$key] = '* '.$info['fullname'].' - '.userdate($info['timeend'], '', $enroller->timezone); } $a = new stdClass(); $a->course = format_string($course->fullname, true, array('context'=>$context)); $a->threshold = get_string('numdays', '', $instance->expirythreshold / (60*60*24)); $a->users = implode("\n", $users); $a->extendurl = (string)new moodle_url('/enrol/users.php', array('id'=>$instance->courseid)); $subject = get_string('expirymessageenrollersubject', 'enrol_'.$name, $a); $body = get_string('expirymessageenrollerbody', 'enrol_'.$name, $a); $message = new stdClass(); $message->notification = 1; $message->component = 'enrol_'.$name; $message->name = 'expiry_notification'; $message->userfrom = $admin; $message->userto = $enroller; $message->subject = $subject; $message->fullmessage = $body; $message->fullmessageformat = FORMAT_MARKDOWN; $message->fullmessagehtml = markdown_to_html($body); $message->smallmessage = $subject; $message->contexturlname = $a->course; $message->contexturl = $a->extendurl; if (message_send($message)) { $trace->output("notifying user $enroller->id about all expiring $name enrolments in course $instance->courseid", 1); } else { $trace->output("error notifying user $enroller->id about all expiring $name enrolments in course $instance->courseid", 1); } force_current_language($oldforcelang); }
<?php use_helper('I18N', 'Date', 'rtText', 'rtTemplate'); ?> <?php if ($rt_blog_posts) { ?> <?php foreach ($rt_blog_posts as $rt_blog_post) { ?> <h3><?php echo link_to($rt_blog_post->getTitle(), 'rt_blog_page_show', $rt_blog_post); ?> </h3> <?php echo markdown_to_html($rt_blog_post->getContent(), $rt_blog_post, true); ?> <p class="rt-list-item-read-more"><em><?php echo link_to(__('Read more') . '→', 'rt_blog_page_show', $rt_blog_post); ?> </em></p> <?php } }
/** * Returns an HTML string * @return string Returns an HTML string */ public function output_html($data, $query = '') { global $OUTPUT; $return = ''; if ($this->visiblename != '') { $return .= $OUTPUT->heading($this->visiblename, 3, 'main'); } if ($this->description != '') { $return .= $OUTPUT->box(highlight($query, markdown_to_html($this->description)), 'generalbox formsettingheading'); } $return .= '<div class="' . $this->name . '">'; $return .= '<style type="text/css" media="screen">'; $return .= '/* <![CDATA[ */'; $return .= "body {"; $return .= "position: relative;"; $return .= "}"; $return .= "/* Code in headings */"; $return .= "h3 code {"; $return .= "font-size: 14px;"; $return .= "font-weight: normal;"; $return .= "}"; $return .= "/* Tweak navbar brand link to be super sleek"; $return .= "-------------------------------------------------- */"; $return .= "body > .navbar {"; $return .= "font-size: 13px;"; $return .= "}"; $return .= "/* Change the docs' brand */"; $return .= "body > .navbar .brand {"; $return .= "padding-right: 0;"; $return .= "padding-left: 0;"; $return .= "margin-left: 20px;"; $return .= "float: right;"; $return .= "font-weight: bold;"; $return .= "color: #000;"; $return .= "text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125);"; $return .= "-webkit-transition: all .2s linear;"; $return .= "-moz-transition: all .2s linear;"; $return .= "transition: all .2s linear;"; $return .= "}"; $return .= "body > .navbar .brand:hover {"; $return .= "text-decoration: none;"; $return .= "text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.4);"; $return .= "}"; $return .= "/* Sections"; $return .= "-------------------------------------------------- */"; $return .= "/* padding for in-page bookmarks and fixed navbar */"; $return .= "section {"; $return .= "padding-top: 30px;"; $return .= "}"; $return .= "section > .page-header,"; $return .= "section > .lead {"; $return .= "color: #5a5a5a;"; $return .= "}"; $return .= "section > ul li {"; $return .= "margin-bottom: 5px;"; $return .= "}"; $return .= "/* Separators (hr) */"; $return .= ".bs-docs-separator {"; $return .= "margin: 40px 0 39px;"; $return .= "}"; $return .= "/* Faded out hr */"; $return .= "hr.soften {"; $return .= "height: 1px;"; $return .= "margin: 70px 0;"; $return .= "background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));"; $return .= "background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));"; $return .= "background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));"; $return .= "background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));"; $return .= "border: 0;"; $return .= "}"; $return .= "/* Jumbotrons"; $return .= "-------------------------------------------------- */"; $return .= "/* Base class"; $return .= "------------------------- */"; $return .= ".jumbotron {"; $return .= "position: relative;"; $return .= "padding: 40px 0;"; $return .= "color: #fff;"; $return .= "text-align: center;"; $return .= "text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);"; $return .= "background: #020031; /* Old browsers */"; $return .= "background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%); /* FF3.6+ */"; $return .= "background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), "; $return .= "color-stop(100%,#6d3353)); /* Chrome,Safari4+ */"; $return .= "background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Chrome10+,Safari5.1+ */"; $return .= "background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Opera 11.10+ */"; $return .= "background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* IE10+ */"; $return .= "background: linear-gradient(45deg, #020031 0%,#6d3353 100%); /* W3C */"; $return .= "filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', "; $return .= "endColorstr='#6d3353',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */"; $return .= "-webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);"; $return .= "-moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);"; $return .= "box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);"; $return .= "}"; $return .= ".jumbotron h1 {"; $return .= "font-size: 80px;"; $return .= "font-weight: bold;"; $return .= "letter-spacing: -1px;"; $return .= "line-height: 1;"; $return .= "}"; $return .= ".jumbotron p {"; $return .= "font-size: 24px;"; $return .= "font-weight: 300;"; $return .= "line-height: 1.25;"; $return .= "margin-bottom: 30px;"; $return .= "}"; $return .= "/* Link styles (used on .masthead-links as well) */"; $return .= ".jumbotron a {"; $return .= "color: #fff;"; $return .= "color: rgba(255,255,255,.5);"; $return .= "-webkit-transition: all .2s ease-in-out;"; $return .= "-moz-transition: all .2s ease-in-out;"; $return .= "transition: all .2s ease-in-out;"; $return .= "}"; $return .= ".jumbotron a:hover {"; $return .= "color: #fff;"; $return .= "text-shadow: 0 0 10px rgba(255,255,255,.25);"; $return .= "}"; $return .= "/* Download button */"; $return .= ".masthead .btn {"; $return .= "padding: 19px 24px;"; $return .= "font-size: 24px;"; $return .= "font-weight: 200;"; $return .= "color: #fff; /* redeclare to override the '.jumbotron a' */"; $return .= "border: 0;"; $return .= "-webkit-border-radius: 6px;"; $return .= "-moz-border-radius: 6px;"; $return .= "border-radius: 6px;"; $return .= "-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "-webkit-transition: none;"; $return .= "-moz-transition: none;"; $return .= "transition: none;"; $return .= "}"; $return .= ".masthead .btn:hover {"; $return .= "-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);"; $return .= "}"; $return .= ".masthead .btn:active {"; $return .= "-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);"; $return .= "-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);"; $return .= "box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);"; $return .= "}"; $return .= "/* Pattern overlay"; $return .= "------------------------- */"; $return .= ".jumbotron .container {"; $return .= "position: relative;"; $return .= "z-index: 2;"; $return .= "}"; $return .= ".jumbotron:after {"; $return .= "content: '';"; $return .= "display: block;"; $return .= "position: absolute;"; $return .= "top: 0;"; $return .= "right: 0;"; $return .= "bottom: 0;"; $return .= "left: 0;"; $return .= "background: url(../img/bs-docs-masthead-pattern.png) repeat center center;"; $return .= "opacity: .4;"; $return .= "}"; $return .= "@media"; $return .= "only screen and (-webkit-min-device-pixel-ratio: 2),"; $return .= "only screen and ( min--moz-device-pixel-ratio: 2),"; $return .= "only screen and ( -o-min-device-pixel-ratio: 2/1) {"; $return .= ""; $return .= ".jumbotron:after {"; $return .= "background-size: 150px 150px;"; $return .= "}"; $return .= "}"; $return .= "/* Masthead (docs home)"; $return .= "------------------------- */"; $return .= ".masthead {"; $return .= "padding: 70px 0 80px;"; $return .= "margin-bottom: 0;"; $return .= "color: #fff;"; $return .= "}"; $return .= ".masthead h1 {"; $return .= "font-size: 120px;"; $return .= "line-height: 1;"; $return .= "letter-spacing: -2px;"; $return .= "}"; $return .= ".masthead p {"; $return .= "font-size: 40px;"; $return .= "font-weight: 200;"; $return .= "line-height: 1.25;"; $return .= "}"; $return .= ""; $return .= "/* Textual links in masthead */"; $return .= ".masthead-links {"; $return .= "margin: 0;"; $return .= "list-style: none;"; $return .= "}"; $return .= ".masthead-links li {"; $return .= "display: inline;"; $return .= "padding: 0 10px;"; $return .= "color: rgba(255,255,255,.25);"; $return .= "}"; $return .= "/* Social proof buttons from GitHub & Twitter */"; $return .= ".bs-docs-social {"; $return .= "padding: 15px 0;"; $return .= "text-align: center;"; $return .= "background-color: #f5f5f5;"; $return .= "border-top: 1px solid #fff;"; $return .= "border-bottom: 1px solid #ddd;"; $return .= "}"; $return .= "/* Quick links on Home */"; $return .= ".bs-docs-social-buttons {"; $return .= "margin-left: 0;"; $return .= "margin-bottom: 0;"; $return .= "padding-left: 0;"; $return .= "list-style: none;"; $return .= "}"; $return .= ".bs-docs-social-buttons li {"; $return .= "display: inline-block;"; $return .= "padding: 5px 8px;"; $return .= "line-height: 1;"; $return .= "*display: inline;"; $return .= "*zoom: 1;"; $return .= "}"; $return .= "/* Subhead (other pages)"; $return .= "------------------------- */"; $return .= ".subhead {"; $return .= "text-align: left;"; $return .= "border-bottom: 1px solid #ddd;"; $return .= "}"; $return .= ".subhead h1 {"; $return .= "font-size: 60px;"; $return .= "}"; $return .= ".subhead p {"; $return .= "margin-bottom: 20px;"; $return .= "}"; $return .= ".subhead .navbar {"; $return .= "display: none;"; $return .= "}"; $return .= "/* Marketing section of Overview"; $return .= "-------------------------------------------------- */"; $return .= ".marketing {"; $return .= "text-align: center;"; $return .= "color: #5a5a5a;"; $return .= "}"; $return .= ".marketing h1 {"; $return .= "margin: 60px 0 10px;"; $return .= "font-size: 60px;"; $return .= "font-weight: 200;"; $return .= "line-height: 1;"; $return .= "letter-spacing: -1px;"; $return .= "}"; $return .= ".marketing h2 {"; $return .= "font-weight: 200;"; $return .= "margin-bottom: 5px;"; $return .= "}"; $return .= ".marketing p {"; $return .= "font-size: 16px;"; $return .= "line-height: 1.5;"; $return .= "}"; $return .= ".marketing .marketing-byline {"; $return .= "margin-bottom: 40px;"; $return .= "font-size: 20px;"; $return .= "font-weight: 300;"; $return .= "line-height: 1.25;"; $return .= "color: #999;"; $return .= "}"; $return .= ".marketing-img {"; $return .= "display: block;"; $return .= "margin: 0 auto 30px;"; $return .= "max-height: 145px;"; $return .= "}"; $return .= "/* Special grid styles"; $return .= "-------------------------------------------------- */"; $return .= ".show-grid {"; $return .= "margin-top: 10px;"; $return .= "margin-bottom: 20px;"; $return .= "}"; $return .= ".show-grid [class*=\"span\"] {"; $return .= "background-color: #eee;"; $return .= "text-align: center;"; $return .= "-webkit-border-radius: 3px;"; $return .= "-moz-border-radius: 3px;"; $return .= "border-radius: 3px;"; $return .= "min-height: 40px;"; $return .= "line-height: 40px;"; $return .= "}"; $return .= ".show-grid [class*=\"span\"]:hover {"; $return .= "background-color: #ddd;"; $return .= "}"; $return .= ".show-grid .show-grid {"; $return .= "margin-top: 0;"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= ".show-grid .show-grid [class*=\"span\"] {"; $return .= "margin-top: 5px;"; $return .= "}"; $return .= ".show-grid [class*=\"span\"] [class*=\"span\"] {"; $return .= "background-color: #ccc;"; $return .= "}"; $return .= ".show-grid [class*=\"span\"] [class*=\"span\"] [class*=\"span\"] {"; $return .= "background-color: #999;"; $return .= "}"; $return .= "/* Mini layout previews"; $return .= "-------------------------------------------------- */"; $return .= ".mini-layout {"; $return .= "border: 1px solid #ddd;"; $return .= "-webkit-border-radius: 6px;"; $return .= "-moz-border-radius: 6px;"; $return .= "border-radius: 6px;"; $return .= "-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075);"; $return .= "-moz-box-shadow: 0 1px 2px rgba(0,0,0,.075);"; $return .= "box-shadow: 0 1px 2px rgba(0,0,0,.075);"; $return .= "}"; $return .= ".mini-layout,"; $return .= ".mini-layout .mini-layout-body,"; $return .= ".mini-layout.fluid .mini-layout-sidebar {"; $return .= "height: 300px;"; $return .= "}"; $return .= ".mini-layout {"; $return .= "margin-bottom: 20px;"; $return .= "padding: 9px;"; $return .= "}"; $return .= ".mini-layout div {"; $return .= "-webkit-border-radius: 3px;"; $return .= "-moz-border-radius: 3px;"; $return .= "border-radius: 3px;"; $return .= "}"; $return .= ".mini-layout .mini-layout-body {"; $return .= "background-color: #dceaf4;"; $return .= "margin: 0 auto;"; $return .= "width: 70%;"; $return .= "}"; $return .= ".mini-layout.fluid .mini-layout-sidebar,"; $return .= ".mini-layout.fluid .mini-layout-header,"; $return .= ".mini-layout.fluid .mini-layout-body {"; $return .= "float: left;"; $return .= "}"; $return .= ".mini-layout.fluid .mini-layout-sidebar {"; $return .= "background-color: #bbd8e9;"; $return .= "width: 20%;"; $return .= "}"; $return .= ".mini-layout.fluid .mini-layout-body {"; $return .= "width: 77.5%;"; $return .= "margin-left: 2.5%;"; $return .= "}"; $return .= "/* Download page"; $return .= "-------------------------------------------------- */"; $return .= ".download .page-header {"; $return .= "margin-top: 36px;"; $return .= "}"; $return .= ".page-header .toggle-all {"; $return .= "margin-top: 5px;"; $return .= "}"; $return .= "/* Space out h3s when following a section */"; $return .= ".download h3 {"; $return .= "margin-bottom: 5px;"; $return .= "}"; $return .= ".download-builder input + h3,"; $return .= ".download-builder .checkbox + h3 {"; $return .= "margin-top: 9px;"; $return .= "}"; $return .= "/* Fields for variables */"; $return .= ".download-builder input[type=text] {"; $return .= "margin-bottom: 9px;"; $return .= "font-family: Menlo, Monaco, \"Courier New\", monospace;"; $return .= "font-size: 12px;"; $return .= "color: #d14;"; $return .= "}"; $return .= ".download-builder input[type=text]:focus {"; $return .= "background-color: #fff;"; $return .= "}"; $return .= "/* Custom, larger checkbox labels */"; $return .= ".download .checkbox {"; $return .= "padding: 6px 10px 6px 25px;"; $return .= "font-size: 13px;"; $return .= "line-height: 18px;"; $return .= "color: #555;"; $return .= "background-color: #f9f9f9;"; $return .= "-webkit-border-radius: 3px;"; $return .= "-moz-border-radius: 3px;"; $return .= "border-radius: 3px;"; $return .= "cursor: pointer;"; $return .= "}"; $return .= ".download .checkbox:hover {"; $return .= "color: #333;"; $return .= "background-color: #f5f5f5;"; $return .= "}"; $return .= ".download .checkbox small {"; $return .= "font-size: 12px;"; $return .= "color: #777;"; $return .= "}"; $return .= "/* Variables section */"; $return .= "#variables label {"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= "/* Giant download button */"; $return .= ".download-btn {"; $return .= "margin: 36px 0 108px;"; $return .= "}"; $return .= "#download p,"; $return .= "#download h4 {"; $return .= "max-width: 50%;"; $return .= "margin: 0 auto;"; $return .= "color: #999;"; $return .= "text-align: center;"; $return .= "}"; $return .= "#download h4 {"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= "#download p {"; $return .= "margin-bottom: 18px;"; $return .= "}"; $return .= ".download-btn .btn {"; $return .= "display: block;"; $return .= "width: auto;"; $return .= "padding: 19px 24px;"; $return .= "margin-bottom: 27px;"; $return .= "font-size: 30px;"; $return .= "line-height: 1;"; $return .= "text-align: center;"; $return .= "-webkit-border-radius: 6px;"; $return .= "-moz-border-radius: 6px;"; $return .= "border-radius: 6px;"; $return .= "}"; $return .= "/* Misc"; $return .= "-------------------------------------------------- */"; $return .= "/* Make tables spaced out a bit more */"; $return .= "h2 + table,"; $return .= "h3 + table,"; $return .= "h4 + table,"; $return .= "h2 + .row {"; $return .= "margin-top: 5px;"; $return .= "}"; $return .= "/* Example sites showcase */"; $return .= ".example-sites {"; $return .= "xmargin-left: 20px;"; $return .= "}"; $return .= ".example-sites img {"; $return .= "max-width: 100%;"; $return .= "margin: 0 auto;"; $return .= "}"; $return .= ".scrollspy-example {"; $return .= "height: 200px;"; $return .= "overflow: auto;"; $return .= "position: relative;"; $return .= "}"; $return .= "/* Fake the :focus state to demo it */"; $return .= ".focused {"; $return .= "border-color: rgba(82,168,236,.8);"; $return .= "-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);"; $return .= "-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);"; $return .= "box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);"; $return .= "outline: 0;"; $return .= "}"; $return .= "/* For input sizes, make them display block */"; $return .= ".docs-input-sizes select,"; $return .= ".docs-input-sizes input[type=text] {"; $return .= "display: block;"; $return .= "margin-bottom: 9px;"; $return .= "}"; $return .= "/* Icons"; $return .= "------------------------- */"; $return .= ".the-icons {"; $return .= "margin-left: 0;"; $return .= "list-style: none;"; $return .= "}"; $return .= ".the-icons li {"; $return .= "float: left;"; $return .= "width: 25%;"; $return .= "line-height: 25px;"; $return .= "}"; $return .= ".the-icons i:hover {"; $return .= "background-color: rgba(255,0,0,.25);"; $return .= "}"; $return .= "/* Example page"; $return .= "------------------------- */"; $return .= ".bootstrap-examples h4 {"; $return .= "margin: 10px 0 5px;"; $return .= "}"; $return .= ".bootstrap-examples p {"; $return .= "font-size: 13px;"; $return .= "line-height: 18px;"; $return .= "}"; $return .= ".bootstrap-examples .thumbnail {"; $return .= "margin-bottom: 9px;"; $return .= "background-color: #fff;"; $return .= "}"; $return .= "/* Bootstrap code examples"; $return .= "-------------------------------------------------- */"; $return .= "/* Base class */"; $return .= ".bs-docs-example {"; $return .= "position: relative;"; $return .= "margin: 15px 0;"; $return .= "padding: 39px 19px 14px;"; $return .= "*padding-top: 19px;"; $return .= "background-color: #fff;"; $return .= "border: 1px solid #ddd;"; $return .= "-webkit-border-radius: 4px;"; $return .= "-moz-border-radius: 4px;"; $return .= "border-radius: 4px;"; $return .= "}"; $return .= "/* Echo out a label for the example */"; $return .= ".bs-docs-example:after {"; $return .= "content: \"Example\";"; $return .= "position: absolute;"; $return .= "top: -1px;"; $return .= "left: -1px;"; $return .= "padding: 3px 7px;"; $return .= "font-size: 12px;"; $return .= "font-weight: bold;"; $return .= "background-color: #f5f5f5;"; $return .= "border: 1px solid #ddd;"; $return .= "color: #9da0a4;"; $return .= "-webkit-border-radius: 4px 0 4px 0;"; $return .= "-moz-border-radius: 4px 0 4px 0;"; $return .= "border-radius: 4px 0 4px 0;"; $return .= "}"; $return .= "/* Remove spacing between an example and it's code */"; $return .= ".bs-docs-example + .prettyprint {"; $return .= "margin-top: -20px;"; $return .= "padding-top: 15px;"; $return .= "}"; $return .= "/* Tweak examples"; $return .= "------------------------- */"; $return .= ".bs-docs-example > p:last-child {"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= ".bs-docs-example .table,"; $return .= ".bs-docs-example .progress,"; $return .= ".bs-docs-example .well,"; $return .= ".bs-docs-example .alert,"; $return .= ".bs-docs-example .hero-unit,"; $return .= ".bs-docs-example .pagination,"; $return .= ".bs-docs-example .navbar,"; $return .= ".bs-docs-example > .nav,"; $return .= ".bs-docs-example blockquote {"; $return .= "margin-bottom: 5px;"; $return .= "}"; $return .= ".bs-docs-example .pagination {"; $return .= "margin-top: 0;"; $return .= "}"; $return .= ".bs-navbar-top-example,"; $return .= ".bs-navbar-bottom-example {"; $return .= "z-index: 1;"; $return .= "padding: 0;"; $return .= "height: 90px;"; $return .= "overflow: hidden; /* cut the drop shadows off */"; $return .= "}"; $return .= ".bs-navbar-top-example .navbar-fixed-top,"; $return .= ".bs-navbar-bottom-example .navbar-fixed-bottom {"; $return .= "margin-left: 0;"; $return .= "margin-right: 0;"; $return .= "}"; $return .= ".bs-navbar-top-example {"; $return .= "-webkit-border-radius: 0 0 4px 4px;"; $return .= "-moz-border-radius: 0 0 4px 4px;"; $return .= "border-radius: 0 0 4px 4px;"; $return .= "}"; $return .= ".bs-navbar-top-example:after {"; $return .= "top: auto;"; $return .= "bottom: -1px;"; $return .= "-webkit-border-radius: 0 4px 0 4px;"; $return .= "-moz-border-radius: 0 4px 0 4px;"; $return .= "border-radius: 0 4px 0 4px;"; $return .= "}"; $return .= ".bs-navbar-bottom-example {"; $return .= "-webkit-border-radius: 4px 4px 0 0;"; $return .= "-moz-border-radius: 4px 4px 0 0;"; $return .= "border-radius: 4px 4px 0 0;"; $return .= "}"; $return .= ".bs-navbar-bottom-example .navbar {"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= "form.bs-docs-example {"; $return .= "padding-bottom: 19px;"; $return .= "}"; $return .= "/* Images */"; $return .= ".bs-docs-example-images img {"; $return .= "margin: 10px;"; $return .= "display: inline-block;"; $return .= "}"; $return .= "/* Tooltips */"; $return .= ".bs-docs-tooltip-examples {"; $return .= "text-align: center;"; $return .= "margin: 0 0 10px;"; $return .= "list-style: none;"; $return .= "}"; $return .= ".bs-docs-tooltip-examples li {"; $return .= "display: inline;"; $return .= "padding: 0 10px;"; $return .= "}"; $return .= "/* Popovers */"; $return .= ".bs-docs-example-popover {"; $return .= "padding-bottom: 24px;"; $return .= "background-color: #f9f9f9;"; $return .= "}"; $return .= ".bs-docs-example-popover .popover {"; $return .= "position: relative;"; $return .= "display: block;"; $return .= "float: left;"; $return .= "width: 260px;"; $return .= "margin: 20px;"; $return .= "}"; $return .= "/* Dropdowns */"; $return .= ".bs-docs-example-submenus {"; $return .= "min-height: 180px;"; $return .= "}"; $return .= ".bs-docs-example-submenus > .pull-left + .pull-left {"; $return .= "margin-left: 20px;"; $return .= "}"; $return .= ".bs-docs-example-submenus .dropup > .dropdown-menu,"; $return .= ".bs-docs-example-submenus .dropdown > .dropdown-menu {"; $return .= "display: block;"; $return .= "position: static;"; $return .= "margin-bottom: 5px;"; $return .= "*width: 180px;"; $return .= "}"; $return .= "/* Responsive docs"; $return .= "-------------------------------------------------- */"; $return .= "/* Utility classes table"; $return .= "------------------------- */"; $return .= ".responsive-utilities th small {"; $return .= "display: block;"; $return .= "font-weight: normal;"; $return .= "color: #999;"; $return .= "}"; $return .= ".responsive-utilities tbody th {"; $return .= "font-weight: normal;"; $return .= "}"; $return .= ".responsive-utilities td {"; $return .= "text-align: center;"; $return .= "}"; $return .= ".responsive-utilities td.is-visible {"; $return .= "color: #468847;"; $return .= "background-color: #dff0d8 !important;"; $return .= "}"; $return .= ".responsive-utilities td.is-hidden {"; $return .= "color: #ccc;"; $return .= "background-color: #f9f9f9 !important;"; $return .= "}"; $return .= "/* Responsive tests"; $return .= "------------------------- */"; $return .= ".responsive-utilities-test {"; $return .= "margin-top: 5px;"; $return .= "margin-left: 0;"; $return .= "list-style: none;"; $return .= "overflow: hidden; /* clear floats */"; $return .= "}"; $return .= ".responsive-utilities-test li {"; $return .= "position: relative;"; $return .= "float: left;"; $return .= "width: 25%;"; $return .= "height: 43px;"; $return .= "font-size: 14px;"; $return .= "font-weight: bold;"; $return .= "line-height: 43px;"; $return .= "color: #999;"; $return .= "text-align: center;"; $return .= "border: 1px solid #ddd;"; $return .= "-webkit-border-radius: 4px;"; $return .= "-moz-border-radius: 4px;"; $return .= "border-radius: 4px;"; $return .= "}"; $return .= ".responsive-utilities-test li + li {"; $return .= "margin-left: 10px;"; $return .= "}"; $return .= ".responsive-utilities-test span {"; $return .= "position: absolute;"; $return .= "top: -1px;"; $return .= "left: -1px;"; $return .= "right: -1px;"; $return .= "bottom: -1px;"; $return .= "-webkit-border-radius: 4px;"; $return .= "-moz-border-radius: 4px;"; $return .= "border-radius: 4px;"; $return .= "}"; $return .= ".responsive-utilities-test span {"; $return .= "color: #468847;"; $return .= "background-color: #dff0d8;"; $return .= "border: 1px solid #d6e9c6;"; $return .= "}"; $return .= "/* Sidenav for Docs"; $return .= "-------------------------------------------------- */"; $return .= ".bs-docs-sidenav {"; $return .= "width: 228px;"; $return .= "margin: 30px 0 0;"; $return .= "padding: 0;"; $return .= "background-color: #fff;"; $return .= "-webkit-border-radius: 6px;"; $return .= "-moz-border-radius: 6px;"; $return .= "border-radius: 6px;"; $return .= "-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065);"; $return .= "-moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);"; $return .= "box-shadow: 0 1px 4px rgba(0,0,0,.065);"; $return .= "}"; $return .= ".bs-docs-sidenav > li > a {"; $return .= "display: block;"; $return .= "width: 190px \\9;"; $return .= "margin: 0 0 -1px;"; $return .= "padding: 8px 14px;"; $return .= "border: 1px solid #e5e5e5;"; $return .= "}"; $return .= ".bs-docs-sidenav > li:first-child > a {"; $return .= "-webkit-border-radius: 6px 6px 0 0;"; $return .= "-moz-border-radius: 6px 6px 0 0;"; $return .= "border-radius: 6px 6px 0 0;"; $return .= "}"; $return .= ".bs-docs-sidenav > li:last-child > a {"; $return .= "-webkit-border-radius: 0 0 6px 6px;"; $return .= "-moz-border-radius: 0 0 6px 6px;"; $return .= "border-radius: 0 0 6px 6px;"; $return .= "}"; $return .= ".bs-docs-sidenav > .active > a {"; $return .= "position: relative;"; $return .= "z-index: 2;"; $return .= "padding: 9px 15px;"; $return .= "border: 0;"; $return .= "text-shadow: 0 1px 0 rgba(0,0,0,.15);"; $return .= "-webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);"; $return .= "-moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);"; $return .= "box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);"; $return .= "}"; $return .= "/* Chevrons */"; $return .= ".bs-docs-sidenav .fa fa-hand-o-right {"; $return .= "float: right;"; $return .= "margin-top: 2px;"; $return .= "margin-right: -6px;"; $return .= "opacity: .25;"; $return .= "}"; $return .= ".bs-docs-sidenav > li > a:hover {"; $return .= "background-color: #f5f5f5;"; $return .= "}"; $return .= ".bs-docs-sidenav a:hover .fa fa-hand-o-right {"; $return .= "opacity: .5;"; $return .= "}"; $return .= ".bs-docs-sidenav .active .fa fa-hand-o-right,"; $return .= ".bs-docs-sidenav .active a:hover .fa fa-hand-o-right {"; $return .= "background-image: url(../img/glyphicons-halflings-white.png);"; $return .= "opacity: 1;"; $return .= "}"; $return .= ".bs-docs-sidenav.affix {"; $return .= "top: 40px;"; $return .= "}"; $return .= ".bs-docs-sidenav.affix-bottom {"; $return .= "position: absolute;"; $return .= "top: auto;"; $return .= "bottom: 270px;"; $return .= "}"; $return .= "/* Responsive"; $return .= "-------------------------------------------------- */"; $return .= "/* Desktop large"; $return .= "------------------------- */"; $return .= "@media (min-width: 1200px) {"; $return .= ".bs-docs-container {"; $return .= "max-width: 970px;"; $return .= "}"; $return .= ".bs-docs-sidenav {"; $return .= "width: 258px;"; $return .= "}"; $return .= ".bs-docs-sidenav > li > a {"; $return .= "width: 230px \\9; /* Override the previous IE8-9 hack */"; $return .= "}"; $return .= "}"; $return .= "/* Desktop"; $return .= "------------------------- */"; $return .= "@media (max-width: 980px) {"; $return .= "/* Unfloat brand */"; $return .= "body > .navbar-fixed-top .brand {"; $return .= "float: left;"; $return .= "margin-left: 0;"; $return .= "padding-left: 10px;"; $return .= "padding-right: 10px;"; $return .= "}"; $return .= ""; $return .= "/* Inline-block quick links for more spacing */"; $return .= ".quick-links li {"; $return .= "display: inline-block;"; $return .= "margin: 5px;"; $return .= "}"; $return .= ""; $return .= "/* When affixed, space properly */"; $return .= ".bs-docs-sidenav {"; $return .= "top: 0;"; $return .= "width: 218px;"; $return .= "margin-top: 30px;"; $return .= "margin-right: 0;"; $return .= "}"; $return .= "}"; $return .= "/* Tablet to desktop"; $return .= "------------------------- */"; $return .= "@media (min-width: 768px) and (max-width: 979px) {"; $return .= "/* Remove any padding from the body */"; $return .= "body {"; $return .= "padding-top: 0;"; $return .= "}"; $return .= "/* Widen masthead and social buttons to fill body padding */"; $return .= ".jumbotron {"; $return .= "margin-top: -20px; /* Offset bottom margin on .navbar */"; $return .= "}"; $return .= "/* Adjust sidenav width */"; $return .= ".bs-docs-sidenav {"; $return .= "width: 166px;"; $return .= "margin-top: 20px;"; $return .= "}"; $return .= ".bs-docs-sidenav.affix {"; $return .= "top: 0;"; $return .= "}"; $return .= "}"; $return .= "/* Tablet"; $return .= "------------------------- */"; $return .= "@media (max-width: 767px) {"; $return .= "/* Remove any padding from the body */"; $return .= "body {"; $return .= "padding-top: 0;"; $return .= "}"; $return .= ""; $return .= "/* Widen masthead and social buttons to fill body padding */"; $return .= ".jumbotron {"; $return .= "padding: 40px 20px;"; $return .= "margin-top: -20px; /* Offset bottom margin on .navbar */"; $return .= "margin-right: -20px;"; $return .= "margin-left: -20px;"; $return .= "}"; $return .= ".masthead h1 {"; $return .= "font-size: 90px;"; $return .= "}"; $return .= ".masthead p,"; $return .= ".masthead .btn {"; $return .= "font-size: 24px;"; $return .= "}"; $return .= ".marketing .span4 {"; $return .= "margin-bottom: 40px;"; $return .= "}"; $return .= ".bs-docs-social {"; $return .= "margin: 0 -20px;"; $return .= "}"; $return .= ""; $return .= "/* Space out the show-grid examples */"; $return .= ".show-grid [class*=\"span\"] {"; $return .= "margin-bottom: 5px;"; $return .= "}"; $return .= ""; $return .= "/* Sidenav */"; $return .= ".bs-docs-sidenav {"; $return .= "width: auto;"; $return .= "margin-bottom: 20px;"; $return .= "}"; $return .= ".bs-docs-sidenav.affix {"; $return .= "position: static;"; $return .= "width: auto;"; $return .= "top: 0;"; $return .= "}"; $return .= ""; $return .= "/* Unfloat the back to top link in footer */"; $return .= ".footer {"; $return .= "margin-left: -20px;"; $return .= "margin-right: -20px;"; $return .= "padding-left: 20px;"; $return .= "padding-right: 20px;"; $return .= "}"; $return .= ".footer p {"; $return .= "margin-bottom: 9px;"; $return .= "}"; $return .= "}"; $return .= "/* Landscape phones"; $return .= "------------------------- */"; $return .= "@media (max-width: 480px) {"; $return .= "/* Remove padding above jumbotron */"; $return .= "body {"; $return .= "padding-top: 0;"; $return .= "}"; $return .= ""; $return .= "/* Change up some type stuff */"; $return .= "h2 small {"; $return .= "display: block;"; $return .= "}"; $return .= ""; $return .= "/* Downsize the jumbotrons */"; $return .= ".jumbotron h1 {"; $return .= "font-size: 45px;"; $return .= "}"; $return .= ".jumbotron p,"; $return .= ".jumbotron .btn {"; $return .= "font-size: 18px;"; $return .= "}"; $return .= ".jumbotron .btn {"; $return .= "display: block;"; $return .= "margin: 0 auto;"; $return .= "}"; $return .= ""; $return .= "/* center align subhead text like the masthead */"; $return .= ".subhead h1,"; $return .= ".subhead p {"; $return .= "text-align: center;"; $return .= "}"; $return .= ""; $return .= "/* Marketing on home */"; $return .= ".marketing h1 {"; $return .= "font-size: 30px;"; $return .= "}"; $return .= ".marketing-byline {"; $return .= "font-size: 18px;"; $return .= "}"; $return .= ""; $return .= "/* center example sites */"; $return .= ".example-sites {"; $return .= "margin-left: 0;"; $return .= "}"; $return .= ".example-sites > li {"; $return .= "float: none;"; $return .= "display: block;"; $return .= "max-width: 280px;"; $return .= "margin: 0 auto 18px;"; $return .= "text-align: center;"; $return .= "}"; $return .= ".example-sites .thumbnail > img {"; $return .= "max-width: 270px;"; $return .= "}"; $return .= ""; $return .= "/* Do our best to make tables work in narrow viewports */"; $return .= "table code {"; $return .= "white-space: normal;"; $return .= "word-wrap: break-word;"; $return .= "word-break: break-all;"; $return .= "}"; $return .= ""; $return .= "/* Examples: dropdowns */"; $return .= ".bs-docs-example-submenus > .pull-left {"; $return .= "float: none;"; $return .= "clear: both;"; $return .= "}"; $return .= ".bs-docs-example-submenus > .pull-left,"; $return .= ".bs-docs-example-submenus > .pull-left + .pull-left {"; $return .= "margin-left: 0;"; $return .= "}"; $return .= ".bs-docs-example-submenus p {"; $return .= "margin-bottom: 0;"; $return .= "}"; $return .= ".bs-docs-example-submenus .dropup > .dropdown-menu,"; $return .= ".bs-docs-example-submenus .dropdown > .dropdown-menu {"; $return .= "margin-bottom: 10px;"; $return .= "float: none;"; $return .= "max-width: 180px;"; $return .= "}"; $return .= ""; $return .= "/* Examples: modal */"; $return .= ".modal-example .modal {"; $return .= "position: relative;"; $return .= "top: auto;"; $return .= "right: auto;"; $return .= "bottom: auto;"; $return .= "left: auto;"; $return .= "}"; $return .= "/* Tighten up footer */"; $return .= ".footer {"; $return .= "padding-top: 20px;"; $return .= "padding-bottom: 20px;"; $return .= "}"; $return .= "}"; // Beyond docs.css. $return .= ".show-grid {"; $return .= "margin-left: 0;"; $return .= "margin-right: 0;"; $return .= "}"; $return .= ".bs-docs-example .navbar {"; $return .= "position: static;"; $return .= "}"; $return .= ".bs-docs-example .carousel-indicators {"; $return .= "background-color: #30add1;"; $return .= "border-radius: 4px;"; $return .= "padding: 2px;"; $return .= "}"; $return .= ".bs-docs-example .carousel-indicators li {"; $return .= "margin-left: 2px;"; $return .= "margin-right: 2px;"; $return .= "}"; $return .= ".bs-docs-example .carousel-inner img {"; $return .= "margin: 0 auto;"; $return .= "}"; $return .= "#forms .checkbox input[type=checkbox] {"; $return .= "margin-left: 0;"; $return .= "margin-right: 0;"; $return .= "}"; $return .= '.' . $this->name . ' .thumbnail-container {'; $return .= 'width: 100%;'; $return .= 'position: relative;'; $return .= 'padding-bottom: 75%;'; $return .= '}'; $return .= '.' . $this->name . ' .thumbnail-container img {'; $return .= 'position: absolute;'; $return .= 'max-height: 100%;'; $return .= 'left: 0;'; $return .= 'right: 0;'; $return .= 'top: 0;'; $return .= 'bottom: 0;'; $return .= 'margin: auto;'; $return .= '}'; $return .= '/* ]]> */'; $return .= '</style>'; $return .= '<!-- Grid system'; $return .= '================================================== -->'; $return .= '<section id="gridSystem">'; $return .= '<div class="page-header">'; $return .= '<h1>Default grid system</h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Live grid example</h2>'; $return .= '<p>The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container '; $return .= 'without <a href="./scaffolding.html#responsive">responsive features</a> enabled. With the responsive CSS '; $return .= 'file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, '; $return .= 'the columns become fluid and stack vertically.</p>'; $return .= '<div class="bs-docs-grid">'; $return .= '<div class="row show-grid">'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '</div>'; $return .= '<div class="row show-grid">'; $return .= '<div class="span2">2</div>'; $return .= '<div class="span3">3</div>'; $return .= '<div class="span4">4</div>'; $return .= '</div>'; $return .= '<div class="row show-grid">'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span5">5</div>'; $return .= '</div>'; $return .= '<div class="row show-grid">'; $return .= '<div class="span9">9</div>'; $return .= '</div>'; $return .= '</div>'; $return .= ''; $return .= '<h3>Basic grid HTML</h3>'; $return .= '<p>For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>'; $return .= '.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 '; $return .= 'columns, and should always add up to 12 for each row (or the number of columns in the parent).</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row">' . PHP_EOL; $return .= ' <div class="span4">...</div>' . PHP_EOL; $return .= ' <div class="span8">...</div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total '; $return .= 'columns and a complete row.</p>'; $return .= ''; $return .= '<h2>Offsetting columns</h2>'; $return .= '<p>Move columns to the right using <code>.offset*</code> classes. Each class increases the left '; $return .= 'margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> '; $return .= 'over four columns.</p>'; $return .= '<div class="bs-docs-grid">'; $return .= '<div class="row show-grid">'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span3 offset2">3 offset 2</div>'; $return .= '</div><!-- /row -->'; $return .= '<div class="row show-grid">'; $return .= '<div class="span3 offset1">3 offset 1</div>'; $return .= '<div class="span3 offset2">3 offset 2</div>'; $return .= '</div><!-- /row -->'; $return .= '<div class="row show-grid">'; $return .= '<div class="span6 offset3">6 offset 3</div>'; $return .= '</div><!-- /row -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row">' . PHP_EOL; $return .= ' <div class="span4">...</div>' . PHP_EOL; $return .= ' <div class="span3 offset2">...</div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Nesting columns</h2>'; $return .= '<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*'; $return .= '</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of '; $return .= 'columns that add up to the number of columns of its parent.</p>'; $return .= '<div class="row show-grid">'; $return .= '<div class="span9">'; $return .= 'Level 1 column'; $return .= '<div class="row show-grid">'; $return .= '<div class="span6">'; $return .= 'Level 2'; $return .= '</div>'; $return .= '<div class="span3">'; $return .= 'Level 2'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row">' . PHP_EOL; $return .= ' <div class="span9">' . PHP_EOL; $return .= ' Level 1 column' . PHP_EOL; $return .= ' <div class="row">' . PHP_EOL; $return .= ' <div class="span6">Level 2</div>' . PHP_EOL; $return .= ' <div class="span3">Level 2</div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Fluid grid system'; $return .= '================================================== -->'; $return .= '<section id="fluidGridSystem">'; $return .= '<div class="page-header">'; $return .= '<h1>Fluid grid system</h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Live fluid grid example</h2>'; $return .= '<p>The fluid grid system uses percents instead of pixels for column widths. It has the same '; $return .= 'responsive capabilities as our fixed grid system, ensuring proper proportions for key screen '; $return .= 'resolutions and devices.</p>'; $return .= '<div class="bs-docs-grid">'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '<div class="span1">1</div>'; $return .= '</div>'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span4">4</div>'; $return .= '</div>'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span8">8</div>'; $return .= '</div>'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span6">6</div>'; $return .= '<div class="span6">6</div>'; $return .= '</div>'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span12">12</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<h3>Basic fluid grid HTML</h3>'; $return .= '<p>Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The '; $return .= 'column classes stay the exact same, making it easy to flip between fixed and fluid grids.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span4">...</div>' . PHP_EOL; $return .= ' <div class="span8">...</div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Fluid offsetting</h2>'; $return .= '<p>Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> '; $return .= 'to any column to offset by that many columns.</p>'; $return .= '<div class="bs-docs-grid">'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span4">4</div>'; $return .= '<div class="span4 offset4">4 offset 4</div>'; $return .= '</div><!-- /row -->'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span3 offset3">3 offset 3</div>'; $return .= '<div class="span3 offset3">3 offset 3</div>'; $return .= '</div><!-- /row -->'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span6 offset6">6 offset 6</div>'; $return .= '</div><!-- /row -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span4">...</div>' . PHP_EOL; $return .= ' <div class="span4 offset2">...</div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Fluid nesting</h2>'; $return .= '<p>Fluid grids utilize nesting differently: each nested level of columns should add up to 12 '; $return .= 'columns. This is because the fluid grid uses percentages, not pixels, for setting widths.</p>'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span12">'; $return .= 'Fluid 12'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span6">'; $return .= 'Fluid 6'; $return .= '<div class="row-fluid show-grid">'; $return .= '<div class="span6">'; $return .= 'Fluid 6'; $return .= '</div>'; $return .= '<div class="span6">'; $return .= 'Fluid 6'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="span6">'; $return .= 'Fluid 6'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span12">' . PHP_EOL; $return .= ' Fluid 12' . PHP_EOL; $return .= ' <div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span6">' . PHP_EOL; $return .= ' Fluid 6' . PHP_EOL; $return .= ' <div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span6">Fluid 6</div>' . PHP_EOL; $return .= ' <div class="span6">Fluid 6</div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="span6">Fluid 6</div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Layouts (Default and fluid)'; $return .= '================================================== -->'; $return .= '<section id="layouts">'; $return .= '<div class="page-header">'; $return .= '<h1>Layouts</h1>'; $return .= '</div>'; $return .= '<h2>Fixed layout</h2>'; $return .= '<p>Provides a common fixed-width (and optionally responsive) layout with only <code><div '; $return .= 'class="container"></code> required.</p>'; $return .= '<div class="mini-layout">'; $return .= '<div class="mini-layout-body"></div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<body>' . PHP_EOL; $return .= ' <div class="container">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</body>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Fluid layout</h2>'; $return .= '<p>Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for '; $return .= 'applications and docs.</p>'; $return .= '<div class="mini-layout fluid">'; $return .= '<div class="mini-layout-sidebar"></div>'; $return .= '<div class="mini-layout-body"></div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="container-fluid">' . PHP_EOL; $return .= ' <div class="row-fluid">' . PHP_EOL; $return .= ' <div class="span2">' . PHP_EOL; $return .= ' <!--Sidebar content-->' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="span10">' . PHP_EOL; $return .= ' <!--Body content-->' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Responsive design'; $return .= '================================================== -->'; $return .= '<section id="responsive">'; $return .= '<div class="page-header">'; $return .= '<h1>Responsive design</h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Enabling responsive features</h2>'; $return .= '<p>Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within '; $return .= 'the <code><head></code> of your document. If you\'ve compiled Bootstrap from the Customize page, you '; $return .= 'need only include the meta tag.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">' . PHP_EOL; $return .= '<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">' . PHP_EOL; $return .= '</pre>'; $return .= '<p><span class="label label-info">Heads up!</span> Bootstrap doesn\'t include responsive features by default '; $return .= 'at this time as not everything needs to be responsive. Instead of encouraging developers to remove this '; $return .= 'feature, we figure it best to enable it as needed.</p>'; $return .= ''; $return .= '<h2>About responsive Bootstrap</h2>'; $return .= '<p>Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, '; $return .= 'etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>'; $return .= '<ul>'; $return .= '<li>Modify the width of column in our grid</li>'; $return .= '<li>Stack elements instead of float wherever necessary</li>'; $return .= '<li>Resize headings and text to be more appropriate for devices</li>'; $return .= '</ul>'; $return .= '<p>Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do '; $return .= 'consider dedicated code bases and not layers of media queries.</p>'; $return .= ''; $return .= '<h2>Supported devices</h2>'; $return .= '<p>Bootstrap supports a handful of media queries in a single file to help make your projects more '; $return .= 'appropriate on different devices and screen resolutions. Here\'s what\'s included:</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Label</th>'; $return .= '<th>Layout width</th>'; $return .= '<th>Column width</th>'; $return .= '<th>Gutter width</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>Large display</td>'; $return .= '<td>1200px and up</td>'; $return .= '<td>70px</td>'; $return .= '<td>30px</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>Default</td>'; $return .= '<td>980px and up</td>'; $return .= '<td>60px</td>'; $return .= '<td>20px</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>Portrait tablets</td>'; $return .= '<td>768px and above</td>'; $return .= '<td>42px</td>'; $return .= '<td>20px</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>Phones to tablets</td>'; $return .= '<td>767px and below</td>'; $return .= '<td class="muted" colspan="2">Fluid columns, no fixed widths</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>Phones</td>'; $return .= '<td>480px and below</td>'; $return .= '<td class="muted" colspan="2">Fluid columns, no fixed widths</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '/* Large desktop */' . PHP_EOL; $return .= '@media (min-width: 1200px) { ... }' . PHP_EOL . PHP_EOL; $return .= '/* Portrait tablet to landscape and desktop */' . PHP_EOL; $return .= '@media (min-width: 768px) and (max-width: 979px) { ... }' . PHP_EOL . PHP_EOL; $return .= '/* Landscape phone to portrait tablet */' . PHP_EOL; $return .= '@media (max-width: 767px) { ... }' . PHP_EOL . PHP_EOL; $return .= '/* Landscape phones and down */' . PHP_EOL; $return .= '@media (max-width: 480px) { ... }' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Responsive utility classes</h2>'; $return .= '<p>For faster mobile-friendly development, use these utility classes for showing and hiding content by '; $return .= 'device. Below is a table of the available classes and their effect on a given media query layout (labeled '; $return .= 'by device). They can be found in <code>responsive.less</code>.</p>'; $return .= '<table class="table table-bordered table-striped responsive-utilities">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Class</th>'; $return .= '<th>Phones <small>767px and below</small></th>'; $return .= '<th>Tablets <small>979px to 768px</small></th>'; $return .= '<th>Desktops <small>Default</small></th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<th><code>.visible-phone</code></th>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<th><code>.visible-tablet</code></th>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<th><code>.visible-desktop</code></th>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<th><code>.hidden-phone</code></th>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<th><code>.hidden-tablet</code></th>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<th><code>.hidden-desktop</code></th>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-visible">Visible</td>'; $return .= '<td class="is-hidden">Hidden</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= ''; $return .= '<h3>When to use</h3>'; $return .= '<p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, '; $return .= 'use them to complement each device\'s presentation. Responsive utilities should not be used with tables, '; $return .= 'and as such are not supported.</p>'; $return .= ''; $return .= '<h3>Responsive utilities test case</h3>'; $return .= '<p>Resize your browser or load on different devices to test the above classes.</p>'; $return .= '<h4>Visible on...</h4>'; $return .= '<p>Green checkmarks indicate that class is visible in your current viewport.</p>'; $return .= '<ul class="responsive-utilities-test">'; $return .= '<li>Phone<span class="visible-phone">✔ Phone</span></li>'; $return .= '<li>Tablet<span class="visible-tablet">✔ Tablet</span></li>'; $return .= '<li>Desktop<span class="visible-desktop">✔ Desktop</span></li>'; $return .= '</ul>'; $return .= '<h4>Hidden on...</h4>'; $return .= '<p>Here, green checkmarks indicate that class is hidden in your current viewport.</p>'; $return .= '<ul class="responsive-utilities-test hidden-on">'; $return .= '<li>Phone<span class="hidden-phone">✔ Phone</span></li>'; $return .= '<li>Tablet<span class="hidden-tablet">✔ Tablet</span></li>'; $return .= '<li>Desktop<span class="hidden-desktop">✔ Desktop</span></li>'; $return .= '</ul>'; $return .= ''; $return .= '</section>'; $return .= '<!-- Typography'; $return .= '================================================== -->'; $return .= '<section id="typography">'; $return .= '<div class="page-header">'; $return .= '<h1>Typography</h1>'; $return .= '</div>'; $return .= '<h2 id="headings">Headings</h2>'; $return .= '<p>All HTML headings, <code><h1></code> through <code><h6></code> are available.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<h1>h1. Heading 1</h1>'; $return .= '<h2>h2. Heading 2</h2>'; $return .= '<h3>h3. Heading 3</h3>'; $return .= '<h4>h4. Heading 4</h4>'; $return .= '<h5>h5. Heading 5</h5>'; $return .= '<h6>h6. Heading 6</h6>'; $return .= '</div>'; $return .= '<h2 id="body-copy">Body copy</h2>'; $return .= '<p>Bootstrap\'s global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height'; $return .= '</code> of <strong>20px</strong>. This is applied to the <code><body></code> and all paragraphs.'; $return .= 'In addition, <code><p></code> (paragraphs) receive a bottom margin of half their line-height '; $return .= '(10px by default).</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis '; $return .= 'dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>'; $return .= '<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec '; $return .= 'ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat '; $return .= 'porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>'; $return .= '<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta '; $return .= 'gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia '; $return .= 'odio sem nec elit.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><p>...</p></pre>'; $return .= '<h3>Lead body copy</h3>'; $return .= '<p>Make a paragraph stand out by adding <code>.lead</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, '; $return .= 'est non commodo luctus.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><p class="lead">...</p></pre>'; $return .= '<h3>Built with Less</h3>'; $return .= '<p>The typographic scale is based on two LESS variables in <strong>variables.less</strong>: <code>'; $return .= '@baseFontSize</code> and <code>@baseLineHeight</code>. The first is the base font-size used throughout'; $return .= 'and the second is the base line-height. We use those variables and some simple math to create the margins, '; $return .= 'paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2 id="emphasis">Emphasis</h2>'; $return .= '<p>Make use of HTML\'s default emphasis tags with lightweight styles.</p>'; $return .= '<h3><code><small></code></h3>'; $return .= '<p>For de-emphasizing inline or blocks of text, <small>use the small tag.</small></p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p><small>This line of text is meant to be treated as fine print.</small></p>'; $return .= '</div>'; $return .= '<pre class="prettyprint">'; $return .= '<p>' . PHP_EOL; $return .= '<small>This line of text is meant to be treated as fine print.</small>' . PHP_EOL; $return .= '</p>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Bold</h3>'; $return .= '<p>For emphasizing a snippet of text with a heavier font-weight.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><strong>rendered as bold text</strong></pre>'; $return .= '<h3>Italics</h3>'; $return .= '<p>For emphasizing a snippet of text with italics.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p>The following snippet of text is <em>rendered as italicized text</em>.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><em>rendered as italicized text</em></pre>'; $return .= '<p><span class="label label-info">Heads up!</span> Feel free to use <code><b></code> and <code>'; $return .= '<i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying'; $return .= 'additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>'; $return .= '<h3>Alignment classes</h3>'; $return .= '<p>Easily realign text to components with text alignment classes.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p class="text-left">Left aligned text.</p>'; $return .= '<p class="text-center">Center aligned text.</p>'; $return .= '<p class="text-right">Right aligned text.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<p class="text-left">Left aligned text.</p>' . PHP_EOL; $return .= '<p class="text-center">Center aligned text.</p>' . PHP_EOL; $return .= '<p class="text-right">Right aligned text.</p>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Emphasis classes</h3>'; $return .= '<p>Convey meaning through color with a handful of emphasis utility classes.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>'; $return .= '<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>'; $return .= '<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>'; $return .= '<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>'; $return .= '<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>' . PHP_EOL; $return .= '<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>' . PHP_EOL; $return .= '<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>' . PHP_EOL; $return .= '<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.<'; $return .= '/p>' . PHP_EOL; $return .= '<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.<'; $return .= '/p>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2 id="abbreviations">Abbreviations</h2>'; $return .= '<p>Stylized implementation of HTML\'s <code><abbr></code> element for abbreviations and acronyms to '; $return .= 'show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted '; $return .= 'bottom border and a help cursor on hover, providing additional context on hover.</p>'; $return .= '<h3><code><abbr></code></h3>'; $return .= '<p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><abbr title="attribute">attr</abbr></pre>'; $return .= '<h3><code><abbr class="initialism"></code></h3>'; $return .= '<p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced '; $return .= 'bread.</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint"><abbr title="HyperText Markup Language" class="initialism">HTML</abbr>'; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2 id="addresses">Addresses</h2>'; $return .= '<p>Present contact information for the nearest ancestor or the entire body of work.</p>'; $return .= '<h3><code><address></code></h3>'; $return .= '<p>Preserve formatting by ending all lines with <code><br></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<address>'; $return .= '<strong>Twitter, Inc.</strong><br>'; $return .= '795 Folsom Ave, Suite 600<br>'; $return .= 'San Francisco, CA 94107<br>'; $return .= '<abbr title="Phone">P:</abbr> (123) 456-7890'; $return .= '</address>'; $return .= '<address>'; $return .= '<strong>Full Name</strong><br>'; $return .= '<a href="mailto:#">first.last@example.com</a>'; $return .= '</address>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<address>' . PHP_EOL; $return .= ' <strong>Twitter, Inc.</strong><br>' . PHP_EOL; $return .= ' 795 Folsom Ave, Suite 600<br>' . PHP_EOL; $return .= ' San Francisco, CA 94107<br>' . PHP_EOL; $return .= ' <abbr title="Phone">P:</abbr> (123) 456-7890' . PHP_EOL; $return .= '</address>' . PHP_EOL . PHP_EOL; $return .= '<address>' . PHP_EOL; $return .= ' <strong>Full Name</strong><br>' . PHP_EOL; $return .= ' <a href="mailto:#">first.last@example.com</a>' . PHP_EOL; $return .= '</address>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2 id="blockquotes">Blockquotes</h2>'; $return .= '<p>For quoting blocks of content from another source within your document.</p>'; $return .= '<h3>Default blockquote</h3>'; $return .= '<p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> '; $return .= 'as the quote. For straight quotes we recommend a <code><p></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<blockquote>'; $return .= '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>'; $return .= '</blockquote>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<blockquote>' . PHP_EOL; $return .= ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.<'; $return .= '/p>' . PHP_EOL; $return .= '</blockquote>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Blockquote options</h3>'; $return .= '<p>Style and content changes for simple variations on a standard blockquote.</p>'; $return .= '<h4>Naming a source</h4>'; $return .= '<p>Add <code><small></code> tag for identifying the source. Wrap the name of the source work in <code>'; $return .= '<cite></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<blockquote>'; $return .= '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>'; $return .= '<small>Someone famous in <cite title="Source Title">Source Title</cite></small>'; $return .= '</blockquote>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<blockquote>' . PHP_EOL; $return .= ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.<'; $return .= '/p>' . PHP_EOL; $return .= ' <small>Someone famous <cite title="Source Title">Source Title</cite></small'; $return .= '>' . PHP_EOL; $return .= '</blockquote>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Alternate displays</h4>'; $return .= '<p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>'; $return .= '<div class="bs-docs-example" style="overflow: hidden;">'; $return .= '<blockquote class="pull-right">'; $return .= '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>'; $return .= '<small>Someone famous in <cite title="Source Title">Source Title</cite></small>'; $return .= '</blockquote>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<blockquote class="pull-right">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</blockquote>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<!-- Lists -->'; $return .= '<h2 id="lists">Lists</h2>'; $return .= '<h3>Unordered</h3>'; $return .= '<p>A list of items in which the order does <em>not</em> explicitly matter.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul>'; $return .= '<li>Lorem ipsum dolor sit amet</li>'; $return .= '<li>Consectetur adipiscing elit</li>'; $return .= '<li>Integer molestie lorem at massa</li>'; $return .= '<li>Facilisis in pretium nisl aliquet</li>'; $return .= '<li>Nulla volutpat aliquam velit'; $return .= '<ul>'; $return .= '<li>Phasellus iaculis neque</li>'; $return .= '<li>Purus sodales ultricies</li>'; $return .= '<li>Vestibulum laoreet porttitor sem</li>'; $return .= '<li>Ac tristique libero volutpat at</li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '<li>Faucibus porta lacus fringilla vel</li>'; $return .= '<li>Aenean sit amet erat nunc</li>'; $return .= '<li>Eget porttitor lorem</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul>' . PHP_EOL; $return .= ' <li>...</li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Ordered</h3>'; $return .= '<p>A list of items in which the order <em>does</em> explicitly matter.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ol>'; $return .= '<li>Lorem ipsum dolor sit amet</li>'; $return .= '<li>Consectetur adipiscing elit</li>'; $return .= '<li>Integer molestie lorem at massa</li>'; $return .= '<li>Facilisis in pretium nisl aliquet</li>'; $return .= '<li>Nulla volutpat aliquam velit</li>'; $return .= '<li>Faucibus porta lacus fringilla vel</li>'; $return .= '<li>Aenean sit amet erat nunc</li>'; $return .= '<li>Eget porttitor lorem</li>'; $return .= '</ol>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ol>' . PHP_EOL; $return .= ' <li>...</li>' . PHP_EOL; $return .= '</ol>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Unstyled</h3>'; $return .= '<p>Remove the default <code>list-style</code> and left padding on list items (immediate children only).</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="unstyled">'; $return .= '<li>Lorem ipsum dolor sit amet</li>'; $return .= '<li>Consectetur adipiscing elit</li>'; $return .= '<li>Integer molestie lorem at massa</li>'; $return .= '<li>Facilisis in pretium nisl aliquet</li>'; $return .= '<li>Nulla volutpat aliquam velit'; $return .= '<ul>'; $return .= '<li>Phasellus iaculis neque</li>'; $return .= '<li>Purus sodales ultricies</li>'; $return .= '<li>Vestibulum laoreet porttitor sem</li>'; $return .= '<li>Ac tristique libero volutpat at</li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '<li>Faucibus porta lacus fringilla vel</li>'; $return .= '<li>Aenean sit amet erat nunc</li>'; $return .= '<li>Eget porttitor lorem</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="unstyled">' . PHP_EOL; $return .= ' <li>...</li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Inline</h3>'; $return .= '<p>Place all list items on a single line with <code>inline-block</code> and some light padding.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="inline">'; $return .= '<li>Lorem ipsum</li>'; $return .= '<li>Phasellus iaculis</li>'; $return .= '<li>Nulla volutpat</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="inline">' . PHP_EOL; $return .= ' <li>...</li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Description</h3>'; $return .= '<p>A list of terms with their associated descriptions.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<dl>'; $return .= '<dt>Description lists</dt>'; $return .= '<dd>A description list is perfect for defining terms.</dd>'; $return .= '<dt>Euismod</dt>'; $return .= '<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>'; $return .= '<dd>Donec id elit non mi porta gravida at eget metus.</dd>'; $return .= '<dt>Malesuada porta</dt>'; $return .= '<dd>Etiam porta sem malesuada magna mollis euismod.</dd>'; $return .= '</dl>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<dl>' . PHP_EOL; $return .= ' <dt>...</dt>' . PHP_EOL; $return .= ' <dd>...</dd>' . PHP_EOL; $return .= '</dl>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Horizontal description</h4>'; $return .= '<p>Make terms and descriptions in <code><dl></code> line up side-by-side.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<dl class="dl-horizontal">'; $return .= '<dt>Description lists</dt>'; $return .= '<dd>A description list is perfect for defining terms.</dd>'; $return .= '<dt>Euismod</dt>'; $return .= '<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>'; $return .= '<dd>Donec id elit non mi porta gravida at eget metus.</dd>'; $return .= '<dt>Malesuada porta</dt>'; $return .= '<dd>Etiam porta sem malesuada magna mollis euismod.</dd>'; $return .= '<dt>Felis euismod semper eget lacinia</dt>'; $return .= '<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit '; $return .= 'amet risus.</dd>'; $return .= '</dl>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<dl class="dl-horizontal">' . PHP_EOL; $return .= ' <dt>...</dt>' . PHP_EOL; $return .= ' <dd>...</dd>' . PHP_EOL; $return .= '</dl>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>'; $return .= '<span class="label label-info">Heads up!</span>'; $return .= 'Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>'; $return .= 'text-overflow</code>. In narrower viewports, they will change to the default stacked layout.'; $return .= '</p>'; $return .= '</section>'; $return .= '<!-- Code'; $return .= '================================================== -->'; $return .= '<section id="code">'; $return .= '<div class="page-header">'; $return .= '<h1>Code</h1>'; $return .= '</div>'; $return .= '<h2>Inline</h2>'; $return .= '<p>Wrap inline snippets of code with <code><code></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= ' For example, <code><section></code> should be wrapped as inline.'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'For example, <code>&lt;section&gt;</code> should be wrapped as inline.'; $return .= '</pre>'; $return .= '<h2>Basic block</h2>'; $return .= '<p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the '; $return .= 'code for proper rendering.</p>'; $return .= '<div class="bs-docs-example">'; $return .= ' <pre><p>Sample text here...</p></pre>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums" style="margin-bottom: 9px;">'; $return .= '<pre>' . PHP_EOL; $return .= ' &lt;p&gt;Sample text here...&lt;/p&gt;' . PHP_EOL; $return .= '</pre>' . PHP_EOL; $return .= '</pre>'; $return .= '<p><span class="label label-info">Heads up!</span> Be sure to keep code within <code><pre></code> '; $return .= 'tags as close to the left as possible; it will render all tabs.</p>'; $return .= '<p>You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and '; $return .= 'provide a y-axis scrollbar.</p>'; $return .= '</section>'; $return .= '<!-- Tables'; $return .= '================================================== -->'; $return .= '<section id="tables">'; $return .= '<div class="page-header">'; $return .= '<h1>Tables</h1>'; $return .= '</div>'; $return .= '<h2>Default styles</h2>'; $return .= '<p>For basic styling—light padding and only horizontal dividers—add the base class '; $return .= '<code>.table</code> to any <code><table></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table">'; $return .= $this->tableone(); $return .= '<table class="table">' . PHP_EOL; $return .= ' …' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Optional classes</h2>'; $return .= '<p>Add any of the following classes to the <code>.table</code> base class.</p>'; $return .= '<h3><code>.table-striped</code></h3>'; $return .= '<p>Adds zebra-striping to any table row within the <code><tbody></code> via the <code>:nth-child'; $return .= '</code> CSS selector (not available in IE7-8).</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table table-striped">'; $return .= $this->tableone(); $return .= '<table class="table table-striped">' . PHP_EOL; $return .= ' …' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3><code>.table-bordered</code></h3>'; $return .= '<p>Add borders and rounded corners to the table.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table table-bordered">'; $return .= '<thead>'; $return .= '<tr>'; $return .= ' <th>#</th>'; $return .= ' <th>First Name</th>'; $return .= ' <th>Last Name</th>'; $return .= ' <th>Username</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= ' <td rowspan="2">1</td>'; $return .= ' <td>Mark</td>'; $return .= ' <td>Otto</td>'; $return .= ' <td>@mdo</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= ' <td>Mark</td>'; $return .= ' <td>Otto</td>'; $return .= ' <td>@TwBootstrap</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= ' <td>2</td>'; $return .= ' <td>Jacob</td>'; $return .= ' <td>Thornton</td>'; $return .= ' <td>@fat</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= ' <td>3</td>'; $return .= ' <td colspan="2">Larry the Bird</td>'; $return .= ' <td>@twitter</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<table class="table table-bordered">' . PHP_EOL; $return .= ' …' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3><code>.table-hover</code></h3>'; $return .= '<p>Enable a hover state on table rows within a <code><tbody></code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table table-hover">'; $return .= $this->tabletwo(); $return .= '<table class="table table-hover">' . PHP_EOL; $return .= ' …' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3><code>.table-condensed</code></h3>'; $return .= '<p>Makes tables more compact by cutting cell padding in half.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table table-condensed">'; $return .= $this->tabletwo(); $return .= '<table class="table table-condensed">' . PHP_EOL; $return .= ' …' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Optional row classes</h2>'; $return .= '<p>Use contextual classes to color table rows.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<colgroup>'; $return .= '<col class="span1">'; $return .= '<col class="span7">'; $return .= '</colgroup>'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Class</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code>.success</code>'; $return .= '</td>'; $return .= '<td>Indicates a successful or positive action.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code>.error</code>'; $return .= '</td>'; $return .= '<td>Indicates a dangerous or potentially negative action.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code>.warning</code>'; $return .= '</td>'; $return .= '<td>Indicates a warning that might need attention.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code>.info</code>'; $return .= '</td>'; $return .= '<td>Used as an alternative to the default styles.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<div class="bs-docs-example">'; $return .= '<table class="table">'; $return .= '<thead>'; $return .= '<tr>'; $return .= ' <th>#</th>'; $return .= ' <th>Product</th>'; $return .= ' <th>Payment Taken</th>'; $return .= ' <th>Status</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr class="success">'; $return .= ' <td>1</td>'; $return .= ' <td>TB - Monthly</td>'; $return .= ' <td>01/04/2012</td>'; $return .= ' <td>Approved</td>'; $return .= '</tr>'; $return .= '<tr class="error">'; $return .= ' <td>2</td>'; $return .= ' <td>TB - Monthly</td>'; $return .= ' <td>02/04/2012</td>'; $return .= ' <td>Declined</td>'; $return .= '</tr>'; $return .= '<tr class="warning">'; $return .= ' <td>3</td>'; $return .= ' <td>TB - Monthly</td>'; $return .= ' <td>03/04/2012</td>'; $return .= ' <td>Pending</td>'; $return .= '</tr>'; $return .= '<tr class="info">'; $return .= ' <td>4</td>'; $return .= ' <td>TB - Monthly</td>'; $return .= ' <td>04/04/2012</td>'; $return .= ' <td>Call in to confirm</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '...' . PHP_EOL; $return .= ' <tr class="success">' . PHP_EOL; $return .= ' <td>1</td>' . PHP_EOL; $return .= ' <td>TB - Monthly</td>' . PHP_EOL; $return .= ' <td>01/04/2012</td>' . PHP_EOL; $return .= ' <td>Approved</td>' . PHP_EOL; $return .= ' </tr>' . PHP_EOL; $return .= '...' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Supported table markup</h2>'; $return .= '<p>List of supported table HTML elements and how they should be used.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<colgroup>'; $return .= '<col class="span1">'; $return .= '<col class="span7">'; $return .= '</colgroup>'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Tag</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><table></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Wrapping element for displaying data in a tabular format'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><thead></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Container element for table header rows (<code><tr></code>) to label table columns'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><tbody></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Container element for table rows (<code><tr></code>) in the body of the table'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><tr></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Container element for a set of table cells (<code><td></code> or <code><th></code>) '; $return .= 'that appears on a single row'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><td></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Default table cell'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><th></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Special table cell for column (or row, depending on scope and placement) labels'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= ' <code><caption></code>'; $return .= '</td>'; $return .= '<td>'; $return .= ' Description or summary of what the table holds, especially useful for screen readers'; $return .= '</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<table>' . PHP_EOL; $return .= ' <caption>...</caption>' . PHP_EOL; $return .= ' <thead>' . PHP_EOL; $return .= ' <tr>' . PHP_EOL; $return .= ' <th>...</th>' . PHP_EOL; $return .= ' <th>...</th>' . PHP_EOL; $return .= ' </tr>' . PHP_EOL; $return .= ' </thead>' . PHP_EOL; $return .= ' <tbody>' . PHP_EOL; $return .= ' <tr>' . PHP_EOL; $return .= ' <td>...</td>' . PHP_EOL; $return .= ' <td>...</td>' . PHP_EOL; $return .= ' </tr>' . PHP_EOL; $return .= ' </tbody>' . PHP_EOL; $return .= '</table>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Forms'; $return .= '================================================== -->'; $return .= '<section id="forms">'; $return .= '<div class="page-header">'; $return .= '<h1>Forms</h1>'; $return .= '</div>'; $return .= '<h2>Default styles</h2>'; $return .= '<p>Individual form controls receive styling, but without any required base class on the <code>'; $return .= '<form></code> or large changes in markup. Results in stacked, left-aligned labels on top '; $return .= 'of form controls.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<fieldset>'; $return .= '<legend>Legend</legend>'; $return .= '<label>Label name</label>'; $return .= '<input type="text" placeholder="Type something…">'; $return .= '<span class="help-block">Example block-level help text here.</span>'; $return .= '<label class="checkbox">'; $return .= '<input type="checkbox"> Check me out'; $return .= '</label>'; $return .= '<button type="submit" class="btn">Submit</button>'; $return .= '</fieldset>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form>' . PHP_EOL; $return .= ' <fieldset>' . PHP_EOL; $return .= ' <legend>Legend</legend>' . PHP_EOL; $return .= ' <label>Label name</label>' . PHP_EOL; $return .= ' <input type="text" placeholder="Type something…">' . PHP_EOL; $return .= ' <span class="help-block">Example block-level help text here.</span>' . PHP_EOL; $return .= ' <label class="checkbox">' . PHP_EOL; $return .= ' <input type="checkbox"> Check me out' . PHP_EOL; $return .= ' </label>' . PHP_EOL; $return .= ' <button type="submit" class="btn">Submit</button>' . PHP_EOL; $return .= ' </fieldset>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Optional layouts</h2>'; $return .= '<p>Included with Bootstrap are three optional form layouts for common use cases.</p>'; $return .= '<h3>Search form</h3>'; $return .= '<p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code><input>'; $return .= '</code> for an extra-rounded text input.</p>'; $return .= '<form class="bs-docs-example form-search">'; $return .= '<input type="text" class="input-medium search-query">'; $return .= '<button type="submit" class="btn">Search</button>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="form-search">' . PHP_EOL; $return .= ' <input type="text" class="input-medium search-query">' . PHP_EOL; $return .= ' <button type="submit" class="btn">Search</button>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Inline form</h3>'; $return .= '<p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input type="text" class="input-small" placeholder="Email">'; $return .= '<input type="password" class="input-small" placeholder="Password">'; $return .= '<label class="checkbox">'; $return .= '<input type="checkbox"> Remember me'; $return .= '</label>'; $return .= '<button type="submit" class="btn">Sign in</button>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="form-inline">' . PHP_EOL; $return .= ' <input type="text" class="input-small" placeholder="Email">' . PHP_EOL; $return .= ' <input type="password" class="input-small" placeholder="Password">' . PHP_EOL; $return .= ' <label class="checkbox">' . PHP_EOL; $return .= ' <input type="checkbox"> Remember me' . PHP_EOL; $return .= ' </label>' . PHP_EOL; $return .= ' <button type="submit" class="btn">Sign in</button>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Horizontal form</h3>'; $return .= '<p>Right align labels and float them to the left to make them appear on the same line as controls. Requires '; $return .= 'the most markup changes from a default form:</p>'; $return .= '<ul>'; $return .= '<li>Add <code>.form-horizontal</code> to the form</li>'; $return .= '<li>Wrap labels and controls in <code>.control-group</code></li>'; $return .= '<li>Add <code>.control-label</code> to the label</li>'; $return .= '<li>Wrap any associated controls in <code>.controls</code> for proper alignment</li>'; $return .= '</ul>'; $return .= '<form class="bs-docs-example form-horizontal">'; $return .= '<div class="control-group">'; $return .= '<label class="control-label" for="inputEmail">Email</label>'; $return .= '<div class="controls">'; $return .= '<input type="text" id="inputEmail" placeholder="Email">'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="control-group">'; $return .= '<label class="control-label" for="inputPassword">Password</label>'; $return .= '<div class="controls">'; $return .= '<input type="password" id="inputPassword" placeholder="Password">'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="control-group">'; $return .= '<div class="controls">'; $return .= '<label class="checkbox">'; $return .= ' <input type="checkbox"> Remember me'; $return .= '</label>'; $return .= '<button type="submit" class="btn">Sign in</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="form-horizontal">' . PHP_EOL; $return .= ' <div class="control-group">' . PHP_EOL; $return .= ' <label class="control-label" for="inputEmail">Email</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="text" id="inputEmail" placeholder="Email">' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="control-group">' . PHP_EOL; $return .= ' <label class="control-label" for="inputPassword">Password</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="password" id="inputPassword" placeholder="Password">' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="control-group">' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <label class="checkbox">' . PHP_EOL; $return .= ' <input type="checkbox"> Remember me' . PHP_EOL; $return .= ' </label>' . PHP_EOL; $return .= ' <button type="submit" class="btn">Sign in</button>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Supported form controls</h2>'; $return .= '<p>Examples of standard form controls supported in an example form layout.</p>'; $return .= '<h3>Inputs</h3>'; $return .= '<p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, '; $return .= 'datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p>'; $return .= '<p>Requires the use of a specified <code>type</code> at all times.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input type="text" placeholder="Text input">'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input type="text" placeholder="Text input">' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Textarea</h3>'; $return .= '<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<textarea rows="3"></textarea>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<textarea rows="3"></textarea>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Checkboxes and radios</h3>'; $return .= '<p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option '; $return .= 'from many.</p>'; $return .= '<h4>Default (stacked)</h4>'; $return .= '<form class="bs-docs-example">'; $return .= '<label class="checkbox">'; $return .= '<input type="checkbox" value="">'; $return .= 'Option one is this and that—be sure to include why it\'s great'; $return .= '</label>'; $return .= '<br>'; $return .= '<label class="radio">'; $return .= '<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>'; $return .= 'Option one is this and that—be sure to include why it\'s great'; $return .= '</label>'; $return .= '<label class="radio">'; $return .= '<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">'; $return .= 'Option two can be something else and selecting it will deselect option one'; $return .= '</label>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<label class="checkbox">' . PHP_EOL; $return .= ' <input type="checkbox" value="">' . PHP_EOL; $return .= ' Option one is this and that—be sure to include why it\'s great' . PHP_EOL; $return .= '</label>' . PHP_EOL . PHP_EOL; $return .= '<label class="radio">' . PHP_EOL; $return .= ' <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>' . PHP_EOL; $return .= ' Option one is this and that—be sure to include why it\'s great' . PHP_EOL; $return .= '</label>' . PHP_EOL; $return .= '<label class="radio">' . PHP_EOL; $return .= ' <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">' . PHP_EOL; $return .= ' Option two can be something else and selecting it will deselect option one' . PHP_EOL; $return .= '</label>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Inline checkboxes</h4>'; $return .= '<p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same '; $return .= 'line.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<label class="checkbox inline">'; $return .= '<input type="checkbox" id="inlineCheckbox1" value="option1"> 1'; $return .= '</label>'; $return .= '<label class="checkbox inline">'; $return .= '<input type="checkbox" id="inlineCheckbox2" value="option2"> 2'; $return .= '</label>'; $return .= '<label class="checkbox inline">'; $return .= '<input type="checkbox" id="inlineCheckbox3" value="option3"> 3'; $return .= '</label>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<label class="checkbox inline">' . PHP_EOL; $return .= ' <input type="checkbox" id="inlineCheckbox1" value="option1"> 1' . PHP_EOL; $return .= '</label>' . PHP_EOL; $return .= '<label class="checkbox inline">' . PHP_EOL; $return .= ' <input type="checkbox" id="inlineCheckbox2" value="option2"> 2' . PHP_EOL; $return .= '</label>' . PHP_EOL; $return .= '<label class="checkbox inline">' . PHP_EOL; $return .= ' <input type="checkbox" id="inlineCheckbox3" value="option3"> 3' . PHP_EOL; $return .= '</label>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Selects</h3>'; $return .= '<p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<select>'; $return .= '<option>1</option>'; $return .= '<option>2</option>'; $return .= '<option>3</option>'; $return .= '<option>4</option>'; $return .= '<option>5</option>'; $return .= '</select>'; $return .= '<br>'; $return .= '<select multiple="multiple">'; $return .= '<option>1</option>'; $return .= '<option>2</option>'; $return .= '<option>3</option>'; $return .= '<option>4</option>'; $return .= '<option>5</option>'; $return .= '</select>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<select>' . PHP_EOL; $return .= ' <option>1</option>' . PHP_EOL; $return .= ' <option>2</option>' . PHP_EOL; $return .= ' <option>3</option>' . PHP_EOL; $return .= ' <option>4</option>' . PHP_EOL; $return .= ' <option>5</option>' . PHP_EOL; $return .= '</select>' . PHP_EOL . PHP_EOL; $return .= '<select multiple="multiple">' . PHP_EOL; $return .= ' <option>1</option>' . PHP_EOL; $return .= ' <option>2</option>' . PHP_EOL; $return .= ' <option>3</option>' . PHP_EOL; $return .= ' <option>4</option>' . PHP_EOL; $return .= ' <option>5</option>' . PHP_EOL; $return .= '</select>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Extending form controls</h2>'; $return .= '<p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p>'; $return .= '<h3>Prepended and appended inputs</h3>'; $return .= '<p>Add text or buttons before or after any text-based input. Do note that <code>select</code> elements are '; $return .= 'not supported here.</p>'; $return .= '<h4>Default options</h4>'; $return .= '<p>Wrap an <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text '; $return .= 'to an input.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-prepend">'; $return .= '<span class="add-on">@</span>'; $return .= '<input class="span2" id="prependedInput" type="text" placeholder="Username">'; $return .= '</div>'; $return .= '<br>'; $return .= '<div class="input-append">'; $return .= '<input class="span2" id="appendedInput" type="text">'; $return .= '<span class="add-on">.00</span>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-prepend">' . PHP_EOL; $return .= ' <span class="add-on">@</span>' . PHP_EOL; $return .= ' <input class="span2" id="prependedInput" type="text" placeholder="Username">' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="input-append">' . PHP_EOL; $return .= ' <input class="span2" id="appendedInput" type="text">' . PHP_EOL; $return .= ' <span class="add-on">.00</span>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Combined</h4>'; $return .= '<p>Use both classes and two instances of <code>.add-on</code> to prepend and append an input.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<div class="input-prepend input-append">'; $return .= '<span class="add-on">$</span>'; $return .= '<input class="span2" id="appendedPrependedInput" type="text">'; $return .= '<span class="add-on">.00</span>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-prepend input-append">' . PHP_EOL; $return .= ' <span class="add-on">$</span>' . PHP_EOL; $return .= ' <input class="span2" id="appendedPrependedInput" type="text">' . PHP_EOL; $return .= ' <span class="add-on">.00</span>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Buttons instead of text</h4>'; $return .= '<p>Instead of a <code><span></code> with text, use a <code>.btn</code> to attach a button (or two) '; $return .= 'to an input.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-append">'; $return .= '<input class="span2" id="appendedInputButton" type="text">'; $return .= '<button class="btn" type="button">Go!</button>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-append">' . PHP_EOL; $return .= ' <input class="span2" id="appendedInputButton" type="text">' . PHP_EOL; $return .= ' <button class="btn" type="button">Go!</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-append">'; $return .= '<input class="span2" id="appendedInputButtons" type="text">'; $return .= '<button class="btn" type="button">Search</button>'; $return .= '<button class="btn" type="button">Options</button>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-append">' . PHP_EOL; $return .= ' <input class="span2" id="appendedInputButtons" type="text">' . PHP_EOL; $return .= ' <button class="btn" type="button">Search</button>' . PHP_EOL; $return .= ' <button class="btn" type="button">Options</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Button dropdowns</h4>'; $return .= '<p></p>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-append">'; $return .= '<input class="span2" id="appendedDropdownButton" type="text">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /input-append -->'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-append">' . PHP_EOL; $return .= ' <input class="span2" id="appendedDropdownButton" type="text">' . PHP_EOL; $return .= ' <div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' Action' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-prepend">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<input class="span2" id="prependedDropdownButton" type="text">'; $return .= '</div><!-- /input-prepend -->'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-prepend">' . PHP_EOL; $return .= ' <div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' Action' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <input class="span2" id="prependedDropdownButton" type="text">' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-prepend input-append">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<input class="span2" id="appendedPrependedDropdownButton" type="text">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /input-prepend input-append -->'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="input-prepend input-append">' . PHP_EOL; $return .= ' <div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' Action' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <input class="span2" id="appendedPrependedDropdownButton" type="text">' . PHP_EOL; $return .= ' <div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' Action' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Segmented dropdown groups</h4>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="input-prepend">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn" tabindex="-1">Action</button>'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">'; $return .= ' <span class="caret"></span>'; $return .= '</button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<input type="text">'; $return .= '</div>'; $return .= '<div class="input-append">'; $return .= '<input type="text">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn" tabindex="-1">Action</button>'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">'; $return .= ' <span class="caret"></span>'; $return .= '</button>'; $return .= '<ul class="dropdown-menu">'; $return .= ' <li><a href="#">Action</a></li>'; $return .= ' <li><a href="#">Another action</a></li>'; $return .= ' <li><a href="#">Something else here</a></li>'; $return .= ' <li class="divider"></li>'; $return .= ' <li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form>' . PHP_EOL; $return .= ' <div class="input-prepend">' . PHP_EOL; $return .= ' <div class="btn-group">...</div>' . PHP_EOL; $return .= ' <input type="text">' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="input-append">' . PHP_EOL; $return .= ' <input type="text">' . PHP_EOL; $return .= ' <div class="btn-group">...</div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Search form</h4>'; $return .= '<form class="bs-docs-example form-search">'; $return .= '<div class="input-append">'; $return .= '<input type="text" class="span10 search-query">'; $return .= '<button type="submit" class="btn">Search</button>'; $return .= '</div>'; $return .= '<div class="input-prepend">'; $return .= '<button type="submit" class="btn">Search</button>'; $return .= '<input type="text" class="span10 search-query">'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="form-search">' . PHP_EOL; $return .= ' <div class="input-append">' . PHP_EOL; $return .= ' <input type="text" class="span2 search-query">' . PHP_EOL; $return .= ' <button type="submit" class="btn">Search</button>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="input-prepend">' . PHP_EOL; $return .= ' <button type="submit" class="btn">Search</button>' . PHP_EOL; $return .= ' <input type="text" class="span2 search-query">' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Control sizing</h3>'; $return .= '<p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid '; $return .= 'column sizes using <code>.span*</code> classes.</p>'; $return .= '<h4>Block level inputs</h4>'; $return .= '<p>Make any <code><input></code> or <code><textarea></code> element behave like a '; $return .= 'block level element.</p>'; $return .= '<form class="bs-docs-example" style="padding-bottom: 15px;">'; $return .= '<div class="controls">'; $return .= '<input class="input-block-level" type="text" placeholder=".input-block-level">'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="input-block-level" type="text" placeholder=".input-block-level">'; $return .= '</pre>'; $return .= '<h4>Relative sizing</h4>'; $return .= '<form class="bs-docs-example" style="padding-bottom: 15px;">'; $return .= '<div class="controls docs-input-sizes">'; $return .= '<input class="input-mini" type="text" placeholder=".input-mini">'; $return .= '<input class="input-small" type="text" placeholder=".input-small">'; $return .= '<input class="input-medium" type="text" placeholder=".input-medium">'; $return .= '<input class="input-large" type="text" placeholder=".input-large">'; $return .= '<input class="input-xlarge" type="text" placeholder=".input-xlarge">'; $return .= '<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="input-mini" type="text" placeholder=".input-mini">' . PHP_EOL; $return .= '<input class="input-small" type="text" placeholder=".input-small">' . PHP_EOL; $return .= '<input class="input-medium" type="text" placeholder=".input-medium">' . PHP_EOL; $return .= '<input class="input-large" type="text" placeholder=".input-large">' . PHP_EOL; $return .= '<input class="input-xlarge" type="text" placeholder=".input-xlarge">' . PHP_EOL; $return .= '<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">' . PHP_EOL; $return .= '</pre>'; $return .= '<p>'; $return .= '<span class="label label-info">Heads up!</span> In future versions, we\'ll be altering the use of '; $return .= 'these relative input classes to match our button sizes. For example, <code>.input-large</code> will '; $return .= 'increase the padding and font-size of an input.'; $return .= '</p>'; $return .= '<h4>Grid sizing</h4>'; $return .= '<p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid'; $return .= 'columns.</p>'; $return .= '<form class="bs-docs-example" style="padding-bottom: 15px;">'; $return .= '<div class="controls docs-input-sizes">'; $return .= '<input class="span1" type="text" placeholder=".span1">'; $return .= '<input class="span2" type="text" placeholder=".span2">'; $return .= '<input class="span3" type="text" placeholder=".span3">'; $return .= '<select class="span1">'; $return .= '<option>1</option>'; $return .= '<option>2</option>'; $return .= '<option>3</option>'; $return .= '<option>4</option>'; $return .= '<option>5</option>'; $return .= '</select>'; $return .= '<select class="span2">'; $return .= '<option>1</option>'; $return .= '<option>2</option>'; $return .= '<option>3</option>'; $return .= '<option>4</option>'; $return .= '<option>5</option>'; $return .= '</select>'; $return .= '<select class="span3">'; $return .= '<option>1</option>'; $return .= '<option>2</option>'; $return .= '<option>3</option>'; $return .= '<option>4</option>'; $return .= '<option>5</option>'; $return .= '</select>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="span1" type="text" placeholder=".span1">' . PHP_EOL; $return .= '<input class="span2" type="text" placeholder=".span2">' . PHP_EOL; $return .= '<input class="span3" type="text" placeholder=".span3">' . PHP_EOL; $return .= '<select class="span1">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</select>' . PHP_EOL; $return .= '<select class="span2">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</select>' . PHP_EOL; $return .= '<select class="span3">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</select>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>For multiple grid inputs per line, <strong>use the <code>.controls-row</code> modifier class for '; $return .= 'proper spacing</strong>. It floats the inputs to collapse white-space, sets the proper margins, and '; $return .= 'clears the float.</p>'; $return .= '<form class="bs-docs-example" style="padding-bottom: 15px;">'; $return .= '<div class="controls">'; $return .= '<input class="span5" type="text" placeholder=".span5">'; $return .= '</div>'; $return .= '<div class="controls controls-row">'; $return .= '<input class="span4" type="text" placeholder=".span4">'; $return .= '<input class="span1" type="text" placeholder=".span1">'; $return .= '</div>'; $return .= '<div class="controls controls-row">'; $return .= '<input class="span3" type="text" placeholder=".span3">'; $return .= '<input class="span2" type="text" placeholder=".span2">'; $return .= '</div>'; $return .= '<div class="controls controls-row">'; $return .= '<input class="span2" type="text" placeholder=".span2">'; $return .= '<input class="span3" type="text" placeholder=".span3">'; $return .= '</div>'; $return .= '<div class="controls controls-row">'; $return .= '<input class="span1" type="text" placeholder=".span1">'; $return .= '<input class="span4" type="text" placeholder=".span4">'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="controls">' . PHP_EOL; $return .= ' <input class="span5" type="text" placeholder=".span5">' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="controls controls-row">' . PHP_EOL; $return .= ' <input class="span4" type="text" placeholder=".span4">' . PHP_EOL; $return .= ' <input class="span1" type="text" placeholder=".span1">' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '...' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Uneditable inputs</h3>'; $return .= '<p>Present data in a form that\'s not editable without using actual form markup.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<span class="input-xlarge uneditable-input">Some value here</span>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<span class="input-xlarge uneditable-input">Some value here</span>'; $return .= '</pre>'; $return .= '<h3>Form actions</h3>'; $return .= '<p>End a form with a group of actions (buttons). When placed within a <code>.form-actions</code>, the '; $return .= 'buttons will automatically indent to line up with the form controls.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<div class="form-actions">'; $return .= '<button type="submit" class="btn btn-primary">Save changes</button>'; $return .= '<button type="button" class="btn">Cancel</button>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="form-actions">' . PHP_EOL; $return .= ' <button type="submit" class="btn btn-primary">Save changes</button>' . PHP_EOL; $return .= ' <button type="button" class="btn">Cancel</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Help text</h3>'; $return .= '<p>Inline and block level support for help text that appears around form controls.</p>'; $return .= '<h4>Inline help</h4>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input type="text"> <span class="help-inline">Inline help text</span>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input type="text"><span class="help-inline">Inline help text</span>'; $return .= '</pre>'; $return .= '<h4>Block help</h4>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input type="text">'; $return .= '<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one '; $return .= 'line.</span>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input type="text"><span class="help-block">A longer block of help text that breaks onto a new '; $return .= 'line and may extend beyond one line.</span>'; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Form control states</h2>'; $return .= '<p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>'; $return .= '<h3>Input focus</h3>'; $return .= '<p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow'; $return .= '</code> in its place for <code>:focus</code>.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused...">'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">'; $return .= '</pre>'; $return .= '<h3>Invalid inputs</h3>'; $return .= '<p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code>,'; $return .= 'add the <code>required</code> attribute if the field is not optional, and (if applicable) specify a <code>'; $return .= 'pattern</code>.</p>'; $return .= '<p>This is not available in versions of Internet Explorer 7-9 due to lack of support for CSS pseudo '; $return .= 'selectors.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input class="span3" type="email" placeholder="*****@*****.**" required>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="span3" type="email" required>'; $return .= '</pre>'; $return .= '<h3>Disabled inputs</h3>'; $return .= '<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly '; $return .= 'different look.</p>'; $return .= '<form class="bs-docs-example form-inline">'; $return .= '<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." '; $return .= 'disabled>'; $return .= '</pre>'; $return .= '<h3>Validation states</h3>'; $return .= '<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the '; $return .= 'appropriate class to the surrounding <code>.control-group</code>.</p>'; $return .= '<form class="bs-docs-example form-horizontal">'; $return .= '<div class="control-group warning">'; $return .= '<label class="control-label" for="inputWarning">Input with warning</label>'; $return .= '<div class="controls">'; $return .= '<input type="text" id="inputWarning">'; $return .= '<span class="help-inline">Something may have gone wrong</span>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="control-group error">'; $return .= '<label class="control-label" for="inputError">Input with error</label>'; $return .= '<div class="controls">'; $return .= '<input type="text" id="inputError">'; $return .= '<span class="help-inline">Please correct the error</span>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="control-group info">'; $return .= '<label class="control-label" for="inputInfo">Input with info</label>'; $return .= '<div class="controls">'; $return .= '<input type="text" id="inputInfo">'; $return .= '<span class="help-inline">Username is taken</span>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="control-group success">'; $return .= '<label class="control-label" for="inputSuccess">Input with success</label>'; $return .= '<div class="controls">'; $return .= '<input type="text" id="inputSuccess">'; $return .= '<span class="help-inline">Woohoo!</span>'; $return .= '</div>'; $return .= '</div>'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="control-group warning">' . PHP_EOL; $return .= ' <label class="control-label" for="inputWarning">Input with warning</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="text" id="inputWarning">' . PHP_EOL; $return .= ' <span class="help-inline">Something may have gone wrong</span>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL . PHP_EOL; $return .= '<div class="control-group error">' . PHP_EOL; $return .= ' <label class="control-label" for="inputError">Input with error</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="text" id="inputError">' . PHP_EOL; $return .= ' <span class="help-inline">Please correct the error</span>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL . PHP_EOL; $return .= '<div class="control-group info">' . PHP_EOL; $return .= ' <label class="control-label" for="inputInfo">Input with info</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="text" id="inputInfo">' . PHP_EOL; $return .= ' <span class="help-inline">Username is already taken</span>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL . PHP_EOL; $return .= '<div class="control-group success">' . PHP_EOL; $return .= ' <label class="control-label" for="inputSuccess">Input with success</label>' . PHP_EOL; $return .= ' <div class="controls">' . PHP_EOL; $return .= ' <input type="text" id="inputSuccess">' . PHP_EOL; $return .= ' <span class="help-inline">Woohoo!</span>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Buttons'; $return .= '================================================== -->'; $return .= '<section id="buttons">'; $return .= '<div class="page-header">'; $return .= '<h1>Buttons</h1>'; $return .= '</div>'; $return .= '<h2>Default buttons</h2>'; $return .= '<p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically '; $return .= 'you\'ll want to apply these to only <code><a></code> and <code><button></code> elements for '; $return .= 'the best rendering.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Button</th>'; $return .= '<th>class=""</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn">Default</button></td>'; $return .= '<td><code>btn</code></td>'; $return .= '<td>Standard gray button with gradient</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-primary">Primary</button></td>'; $return .= '<td><code>btn btn-primary</code></td>'; $return .= '<td>Provides extra visual weight and identifies the primary action in a set of buttons</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-info">Info</button></td>'; $return .= '<td><code>btn btn-info</code></td>'; $return .= '<td>Used as an alternative to the default styles</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-success">Success</button></td>'; $return .= '<td><code>btn btn-success</code></td>'; $return .= '<td>Indicates a successful or positive action</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-warning">Warning</button></td>'; $return .= '<td><code>btn btn-warning</code></td>'; $return .= '<td>Indicates caution should be taken with this action</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-danger">Danger</button></td>'; $return .= '<td><code>btn btn-danger</code></td>'; $return .= '<td>Indicates a dangerous or potentially negative action</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-inverse">Inverse</button></td>'; $return .= '<td><code>btn btn-inverse</code></td>'; $return .= '<td>Alternate dark gray button, not tied to a semantic action or use</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td><button type="button" class="btn btn-link">Link</button></td>'; $return .= '<td><code>btn btn-link</code></td>'; $return .= '<td>Deemphasize a button by making it look like a link while maintaining button behavior</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h4>Cross browser compatibility</h4>'; $return .= '<p>IE9 doesn\'t crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies '; $return .= 'disabled <code>button</code> elements, rendering text gray with a nasty text-shadow that we cannot fix.</p>'; $return .= '<h2>Button sizes</h2>'; $return .= '<p>Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini'; $return .= '</code> for additional sizes.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p>'; $return .= '<button type="button" class="btn btn-large btn-primary">Large button</button>'; $return .= '<button type="button" class="btn btn-large">Large button</button>'; $return .= '</p>'; $return .= '<p>'; $return .= '<button type="button" class="btn btn-primary">Default button</button>'; $return .= '<button type="button" class="btn">Default button</button>'; $return .= '</p>'; $return .= '<p>'; $return .= '<button type="button" class="btn btn-small btn-primary">Small button</button>'; $return .= '<button type="button" class="btn btn-small">Small button</button>'; $return .= '</p>'; $return .= '<p>'; $return .= '<button type="button" class="btn btn-mini btn-primary">Mini button</button>'; $return .= '<button type="button" class="btn btn-mini">Mini button</button>'; $return .= '</p>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<p>' . PHP_EOL; $return .= ' <button class="btn btn-large btn-primary" type="button">Large button</button>' . PHP_EOL; $return .= ' <button class="btn btn-large" type="button">Large button</button>' . PHP_EOL; $return .= '</p>' . PHP_EOL; $return .= '<p>' . PHP_EOL; $return .= ' <button class="btn btn-primary" type="button">Default button</button>' . PHP_EOL; $return .= ' <button class="btn" type="button">Default button</button>' . PHP_EOL; $return .= '</p>' . PHP_EOL; $return .= '<p>' . PHP_EOL; $return .= ' <button class="btn btn-small btn-primary" type="button">Small button</button>' . PHP_EOL; $return .= ' <button class="btn btn-small" type="button">Small button</button>' . PHP_EOL; $return .= '</p>' . PHP_EOL; $return .= '<p>' . PHP_EOL; $return .= ' <button class="btn btn-mini btn-primary" type="button">Mini button</button>' . PHP_EOL; $return .= ' <button class="btn btn-mini" type="button">Mini button</button>' . PHP_EOL; $return .= '</p>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>Create block level buttons—those that span the full width of a parent— by adding <code>'; $return .= '.btn-block</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="well" style="max-width: 400px; margin: 0 auto 10px;">'; $return .= '<button type="button" class="btn btn-large btn-block btn-primary">Block level button</button>'; $return .= '<button type="button" class="btn btn-large btn-block">Block level button</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<button class="btn btn-large btn-block btn-primary" type="button">Block level button<'; $return .= '/button>' . PHP_EOL; $return .= '<button class="btn btn-large btn-block" type="button">Block level button</button>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Disabled state</h2>'; $return .= '<p>Make buttons look unclickable by fading them back 50%.</p>'; $return .= '<h3>Anchor element</h3>'; $return .= '<p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p>'; $return .= '<p class="bs-docs-example">'; $return .= '<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>'; $return .= '<a href="#" class="btn btn-large disabled">Link</a>'; $return .= '</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>' . PHP_EOL; $return .= '<a href="#" class="btn btn-large disabled">Link</a>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>'; $return .= '<span class="label label-info">Heads up!</span>'; $return .= 'We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so '; $return .= 'no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable '; $return .= 'links here.'; $return .= '</p>'; $return .= '<h3>Button element</h3>'; $return .= '<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p>'; $return .= '<p class="bs-docs-example">'; $return .= '<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button>'; $return .= '<button type="button" class="btn btn-large" disabled>Button</button>'; $return .= '</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary '; $return .= 'button<' . PHP_EOL; $return .= '/button>' . PHP_EOL; $return .= '<button type="button" class="btn btn-large" disabled>Button</button>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>One class, multiple tags</h2>'; $return .= '<p>Use the <code>.btn</code> class on an <code><a></code>, <code><button></code>, or <code><'; $return .= 'input></code> element.</p>'; $return .= '<form class="bs-docs-example">'; $return .= '<a class="btn" href="">Link</a>'; $return .= '<button class="btn" type="submit">Button</button>'; $return .= '<input class="btn" type="button" value="Input">'; $return .= '<input class="btn" type="submit" value="Submit">'; $return .= '</form>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<a class="btn" href="">Link</a>' . PHP_EOL; $return .= '<button class="btn" type="submit">Button</button>' . PHP_EOL; $return .= '<input class="btn" type="button" value="Input">' . PHP_EOL; $return .= '<input class="btn" type="submit" value="Submit">' . PHP_EOL; $return .= '</pre>'; $return .= '<p>As a best practice, try to match the element for your context to ensure matching cross-browser '; $return .= 'rendering. If you have an <code>input</code>, use an <code><input type="submit"></code> for '; $return .= 'your button.</p>'; $return .= '</section>'; $return .= '<!-- Images'; $return .= '================================================== -->'; $return .= '<section id="images">'; $return .= '<div class="page-header">'; $return .= '<h1>Images</h1>'; $return .= '</div>'; $return .= '<p>Add classes to an <code><img></code> element to easily style images in any project.</p>'; $return .= '<div class="bs-docs-example bs-docs-example-images">'; $return .= '<img class="img-rounded" alt="140x140" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22140%22%20hei'; $return .= 'ght%3D%22140%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20140%20140%22%20pr'; $return .= 'eserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_153197a2e10%20text%'; $return .= '20%7B%20fill%3A%23AAAAAA%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20sans'; $return .= '-serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_153197a2e10'; $return .= '%22%3E%3Crect%20width%3D%22140%22%20height%3D%22140%22%20fill%3D%22%23EEEEEE%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext'; $return .= '%20x%3D%2245.5%22%20y%3D%2274.5%22%3E140x140%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-render'; $return .= 'ed="true" style="width: 140px; height: 140px;">'; $return .= '<img class="img-circle" alt="140x140" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22140%22%20heig'; $return .= 'ht%3D%22140%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20140%20140%22%20pre'; $return .= 'serveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_153197a2e19%20text%2'; $return .= '0%7B%20fill%3A%23AAAAAA%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20sans-'; $return .= 'serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_153197a2e19%'; $return .= '22%3E%3Crect%20width%3D%22140%22%20height%3D%22140%22%20fill%3D%22%23EEEEEE%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%'; $return .= '20x%3D%2245.5%22%20y%3D%2274.5%22%3E140x140%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendere'; $return .= 'd="true" style="width: 140px; height: 140px;">'; $return .= '<img class="img-polaroid" alt="140x140" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22140%22%20he'; $return .= 'ight%3D%22140%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20140%20140%22%20p'; $return .= 'reserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_153197a2e20%20text'; $return .= '%20%7B%20fill%3A%23AAAAAA%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20san'; $return .= 's-serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_153197a2e2'; $return .= '0%22%3E%3Crect%20width%3D%22140%22%20height%3D%22140%22%20fill%3D%22%23EEEEEE%22%3E%3C%2Frect%3E%3Cg%3E%3Ctex'; $return .= 't%20x%3D%2245.5%22%20y%3D%2274.5%22%3E140x140%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rende'; $return .= 'red="true" style="width: 140px; height: 140px;">'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<img src="..." class="img-rounded">' . PHP_EOL; $return .= '<img src="..." class="img-circle">' . PHP_EOL; $return .= '<img src="..." class="img-polaroid">' . PHP_EOL; $return .= '</pre>'; $return .= '<p><span class="label label-info">Heads up!</span> <code>.img-rounded</code> and <code>.img-circle</code> do'; $return .= 'not work in IE7-8 due to lack of <code>border-radius</code> support.</p>'; $return .= '</section>'; $return .= '<!-- Dropdowns'; $return .= '================================================== -->'; $return .= '<section id="dropdowns">'; $return .= '<div class="page-header">'; $return .= '<h1>Dropdown menus</h1>'; $return .= '</div>'; $return .= '<h2>Example</h2>'; $return .= '<p>Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href='; $return .= '"./javascript.html#dropdowns">dropdown JavaScript plugin</a>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="dropdown clearfix">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; '; $return .= 'position: static; margin-bottom: 5px; *width: 180px;">'; $return .= '<li><a tabindex="-1" href="#">Action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Another action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Action</a></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Another action</a></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Something else here</a></li>' . PHP_EOL; $return .= ' <li class="divider"></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Separated link</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Markup</h2>'; $return .= '<p>Looking at just the dropdown menu, here\'s the required HTML. You need to wrap the dropdown\'s '; $return .= 'trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>'; $return .= 'position: relative;</code>. Then just create the menu.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="dropdown">' . PHP_EOL; $return .= ' <!-- Link or button to toggle dropdown -->' . PHP_EOL; $return .= ' <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Action</a></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Another action</a></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Something else here</a></li>' . PHP_EOL; $return .= ' <li class="divider"></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Separated link</a></li>' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Options</h2>'; $return .= '<p>Align menus to the right and add include additional levels of dropdowns.</p>'; $return .= '<h3>Aligning the menus</h3>'; $return .= '<p>Add <code>.pull-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Disabled menu options</h3>'; $return .= '<p>Add <code>.disabled</code> to a <code><li></code> in the dropdown to disable the link.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="dropdown clearfix">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: '; $return .= 'static; margin-bottom: 5px; *width: 180px;">'; $return .= '<li><a tabindex="-1" href="#">Regular link</a></li>'; $return .= '<li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Another link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Regular link</a></li>' . PHP_EOL; $return .= ' <li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>' . PHP_EOL; $return .= ' <li><a tabindex="-1" href="#">Another link</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Sub menus on dropdowns</h3>'; $return .= '<p>Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup '; $return .= 'additions. Add <code>.dropdown-submenu</code> to any <code>li</code> in an existing dropdown menu for '; $return .= 'automatic styling.</p>'; $return .= '<div class="bs-docs-example bs-docs-example-submenus">'; $return .= '<div class="pull-left">'; $return .= '<p class="muted">Default</p>'; $return .= '<div class="dropdown clearfix">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">'; $return .= '<li><a tabindex="-1" href="#">Action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Another action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li class="dropdown-submenu">'; $return .= '<a tabindex="-1" href="#">More options</a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="pull-left">'; $return .= '<p class="muted">Dropup</p>'; $return .= '<div class="dropup">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">'; $return .= '<li><a tabindex="-1" href="#">Action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Another action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li class="dropdown-submenu">'; $return .= '<a tabindex="-1" href="#">More options</a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="pull-left">'; $return .= '<p class="muted">Left submenu</p>'; $return .= '<div class="dropdown">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">'; $return .= '<li><a tabindex="-1" href="#">Action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Another action</a></li>'; $return .= '<li><a tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li class="dropdown-submenu pull-left">'; $return .= '<a tabindex="-1" href="#">More options</a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '<li><a tabindex="-1" href="#">Second level link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' <li class="dropdown-submenu">' . PHP_EOL; $return .= ' <a tabindex="-1" href="#">More options</a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Button Groups'; $return .= '================================================== -->'; $return .= '<section id="buttonGroups">'; $return .= '<div class="page-header">'; $return .= '<h1>Button groups</h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>Two basic options, along with two more specific variations.</p>'; $return .= '<h3>Single button group</h3>'; $return .= '<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-group" style="margin: 9px 0 5px;">'; $return .= '<button class="btn">Left</button>'; $return .= '<button class="btn">Middle</button>'; $return .= '<button class="btn">Right</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn">Left</button>' . PHP_EOL; $return .= ' <button class="btn">Middle</button>' . PHP_EOL; $return .= ' <button class="btn">Right</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Multiple button groups</h3>'; $return .= '<p>Combine sets of <code><div class="btn-group"></code> into a <code><div class='; $return .= '"btn-toolbar"></code> for more complex components.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar" style="margin: 0;">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn">1</button>'; $return .= '<button class="btn">2</button>'; $return .= '<button class="btn">3</button>'; $return .= '<button class="btn">4</button>'; $return .= '</div>'; $return .= '<div class="btn-group">'; $return .= '<button class="btn">5</button>'; $return .= '<button class="btn">6</button>'; $return .= '<button class="btn">7</button>'; $return .= '</div>'; $return .= '<div class="btn-group">'; $return .= '<button class="btn">8</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-toolbar">' . PHP_EOL; $return .= ' <div class="btn-group">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Vertical button groups</h3>'; $return .= '<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-group btn-group-vertical">'; $return .= '<button type="button" class="btn"><i class="icon-align-left"></i></button>'; $return .= '<button type="button" class="btn"><i class="icon-align-center"></i></button>'; $return .= '<button type="button" class="btn"><i class="icon-align-right"></i></button>'; $return .= '<button type="button" class="btn"><i class="icon-align-justify"></i></button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group btn-group-vertical">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h4>Checkbox and radio flavors</h4>'; $return .= '<p>Button groups can also function as radios, where only one button may be active, or '; $return .= 'checkboxes, where any number of buttons may be active. View <a href="./javascript.html#'; $return .= 'buttons">the JavaScript docs</a> for that.</p>'; $return .= '<h4>Dropdowns in button groups</h4>'; $return .= '<p><span class="label label-info">Heads up!</span> Buttons with dropdowns must be individually '; $return .= 'wrapped in their own <code>.btn-group</code> within a <code>.btn-toolbar</code> for proper rendering.</p>'; $return .= '</section>'; $return .= '<!-- Split button dropdowns'; $return .= '================================================== -->'; $return .= '<section id="buttonDropdowns">'; $return .= '<div class="page-header">'; $return .= '<h1>Button dropdown menus</h1>'; $return .= '</div>'; $return .= '<h2>Overview and examples</h2>'; $return .= '<p>Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and '; $return .= 'providing the proper menu markup.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar" style="margin: 0;">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-info dropdown-toggle" data-toggle="dropdown">Info <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">Inverse <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group">' . PHP_EOL; $return .= ' <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">' . PHP_EOL; $return .= ' Action' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- dropdown menu links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Works with all button sizes</h3>'; $return .= '<p>Button dropdowns work at any size: <code>.btn-large</code>, <code>.btn-small</code>, or <code>'; $return .= '.btn-mini</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar" style="margin: 0;">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-large dropdown-toggle" data-toggle="dropdown">Large button <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">Small button <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Mini button <span class="caret">'; $return .= '</span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '</div>'; $return .= '<h3>Requires JavaScript</h3>'; $return .= '<p>Button dropdowns require the <a href="./javascript.html#dropdowns">Bootstrap dropdown plugin</a> to '; $return .= 'function.</p>'; $return .= '<p>In some cases—like mobile—dropdown menus will extend outside the viewport. You need to '; $return .= 'resolve the alignment manually or with custom JavaScript.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Split button dropdowns</h2>'; $return .= '<p>Building on the button group styles and markup, we can easily create a split button. Split buttons '; $return .= 'feature a standard action on the left and a dropdown toggle on the right with contextual links.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar" style="margin: 0;">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn">Action</button>'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-primary">Action</button>'; $return .= '<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-danger">Danger</button>'; $return .= '<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-warning">Warning</button>'; $return .= '<button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-success">Success</button>'; $return .= '<button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-info">Info</button>'; $return .= '<button class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-inverse">Inverse</button>'; $return .= '<button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn">Action</button>' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- dropdown menu links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Sizes</h3>'; $return .= '<p>Utilize the extra button classes <code>.btn-mini</code>, <code>.btn-small</code>, or <code>.btn-large'; $return .= '</code> for sizing.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-large">Large action</button>'; $return .= '<button class="btn btn-large dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '<div class="btn-toolbar">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-small">Small action</button>'; $return .= '<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '<div class="btn-toolbar">'; $return .= '<div class="btn-group">'; $return .= '<button class="btn btn-mini">Mini action</button>'; $return .= '<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div><!-- /btn-toolbar -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group">' . PHP_EOL; $return .= ' <button class="btn btn-mini">Action</button>' . PHP_EOL; $return .= ' <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- dropdown menu links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Dropup menus</h3>'; $return .= '<p>Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of '; $return .= '<code>.dropdown-menu</code>. It will flip the direction of the <code>.caret</code> and reposition the menu '; $return .= 'itself to move from the bottom up instead of top down.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="btn-toolbar" style="margin: 0;">'; $return .= '<div class="btn-group dropup">'; $return .= '<button class="btn">Dropup</button>'; $return .= '<button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '<div class="btn-group dropup">'; $return .= '<button class="btn primary">Right dropup</button>'; $return .= '<button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'; $return .= '<ul class="dropdown-menu pull-right">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</div><!-- /btn-group -->'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group dropup">' . PHP_EOL; $return .= ' <button class="btn">Dropup</button>' . PHP_EOL; $return .= ' <button class="btn dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' <span class="caret"></span>' . PHP_EOL; $return .= ' </button>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- dropdown menu links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Nav, Tabs, & Pills'; $return .= '================================================== -->'; $return .= '<section id="navs">'; $return .= '<div class="page-header">'; $return .= '<h1>Nav: tabs, pills, and lists</small></h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Lightweight defaults <small>Same markup, different classes</small></h2>'; $return .= '<p>All nav components here—tabs, pills, and lists—<strong>share the same base markup and '; $return .= 'styles</strong> through the <code>.nav</code> class.</p>'; $return .= ''; $return .= '<h3>Basic tabs</h3>'; $return .= '<p>Take a regular <code><ul></code> of links and add <code>.nav-tabs</code>:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Profile</a></li>'; $return .= '<li><a href="#">Messages</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-tabs">' . PHP_EOL; $return .= ' <li class="active">' . PHP_EOL; $return .= ' <a href="#">Home</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' <li><a href="#">...</a></li>' . PHP_EOL; $return .= ' <li><a href="#">...</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Basic pills</h3>'; $return .= '<p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-pills">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Profile</a></li>'; $return .= '<li><a href="#">Messages</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-pills">' . PHP_EOL; $return .= ' <li class="active">' . PHP_EOL; $return .= ' <a href="#">Home</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' <li><a href="#">...</a></li>' . PHP_EOL; $return .= ' <li><a href="#">...</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Disabled state</h3>'; $return .= '<p>For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no '; $return .= 'hover effects</strong>. Links will remain clickable, however, unless you remove the <code>href</code> '; $return .= 'attribute. Alternatively, you could implement custom JavaScript to prevent those clicks.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-pills">'; $return .= '<li><a href="#">Clickable link</a></li>'; $return .= '<li><a href="#">Clickable link</a></li>'; $return .= '<li class="disabled"><a href="#">Disabled link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-pills">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' <li class="disabled"><a href="#">Home</a></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Component alignment</h3>'; $return .= '<p>To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both '; $return .= 'classes will add a CSS float in the specified direction.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Stackable</h2>'; $return .= '<p>As tabs and pills are horizontal by default, just add a second class, <code>.nav-stacked</code>, to make '; $return .= 'them appear vertically stacked.</p>'; $return .= '<h3>Stacked tabs</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-tabs nav-stacked">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Profile</a></li>'; $return .= '<li><a href="#">Messages</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-tabs nav-stacked">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Stacked pills</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-pills nav-stacked">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Profile</a></li>'; $return .= '<li><a href="#">Messages</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-pills nav-stacked">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Dropdowns</h2>'; $return .= '<p>Add dropdown menus with a little extra HTML and the <a href="./javascript.html#dropdowns">dropdowns '; $return .= 'JavaScript plugin</a>.</p>'; $return .= '<h3>Tabs with dropdowns</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Help</a></li>'; $return .= '<li class="dropdown">'; $return .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-tabs">' . PHP_EOL; $return .= ' <li class="dropdown">' . PHP_EOL; $return .= ' <a class="dropdown-toggle"' . PHP_EOL; $return .= ' data-toggle="dropdown"' . PHP_EOL; $return .= ' href="#">' . PHP_EOL; $return .= ' Dropdown' . PHP_EOL; $return .= ' <b class="caret"></b>' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Pills with dropdowns</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-pills">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Help</a></li>'; $return .= '<li class="dropdown">'; $return .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#">Action</a></li>'; $return .= '<li><a href="#">Another action</a></li>'; $return .= '<li><a href="#">Something else here</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-pills">' . PHP_EOL; $return .= ' <li class="dropdown">' . PHP_EOL; $return .= ' <a class="dropdown-toggle"' . PHP_EOL; $return .= ' data-toggle="dropdown"' . PHP_EOL; $return .= ' href="#">' . PHP_EOL; $return .= ' Dropdown' . PHP_EOL; $return .= ' <b class="caret"></b>' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' <!-- links -->' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Nav lists</h2>'; $return .= '<p>A simple and easy way to build groups of nav links with optional headers. They\'re best used in '; $return .= 'sidebars like the Finder in OS X.</p>'; $return .= '<h3>Example nav list</h3>'; $return .= '<p>Take a list of links and add <code>class="nav nav-list"</code>:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="well" style="max-width: 340px; padding: 8px 0;">'; $return .= '<ul class="nav nav-list">'; $return .= '<li class="nav-header">List header</li>'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Library</a></li>'; $return .= '<li><a href="#">Applications</a></li>'; $return .= '<li class="nav-header">Another list header</li>'; $return .= '<li><a href="#">Profile</a></li>'; $return .= '<li><a href="#">Settings</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#">Help</a></li>'; $return .= '</ul>'; $return .= '</div> <!-- /well -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-list">' . PHP_EOL; $return .= ' <li class="nav-header">List header</li>' . PHP_EOL; $return .= ' <li class="active"><a href="#">Home</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Library</a></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>'; $return .= '<span class="label label-info">Note</span>'; $return .= 'For nesting within a nav list, include <code>class="nav nav-list"</code> on any nested <code><ul>'; $return .= '</code>.'; $return .= '</p>'; $return .= '<h3>Horizontal dividers</h3>'; $return .= '<p>Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-list">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' <li class="divider"></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Tabbable nav</h2>'; $return .= '<p>Bring your tabs to life with a simple plugin to toggle between content via tabs. Bootstrap integrates '; $return .= 'tabbable tabs in four styles: top (default), right, bottom, and left.</p>'; $return .= '<h3>Tabbable example</h3>'; $return .= '<p>To make tabs tabbable, create a <code>.tab-pane</code> with unique ID for every tab and wrap them in '; $return .= '<code>.tab-content</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="tabbable" style="margin-bottom: 18px;">'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li>'; $return .= '<li><a href="#tab2" data-toggle="tab">Section 2</a></li>'; $return .= '<li><a href="#tab3" data-toggle="tab">Section 3</a></li>'; $return .= '</ul>'; $return .= '<div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">'; $return .= '<div class="tab-pane active" id="tab1">'; $return .= '<p>I\'m in Section 1.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="tab2">'; $return .= '<p>Howdy, I\'m in Section 2.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="tab3">'; $return .= '<p>What up girl, this is Section 3.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div> <!-- /tabbable -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="tabbable"> <!-- Only required for left/right tabs -->' . PHP_EOL; $return .= ' <ul class="nav nav-tabs">' . PHP_EOL; $return .= ' <li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li>' . PHP_EOL; $return .= ' <li><a href="#tab2" data-toggle="tab">Section 2</a></li>' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' <div class="tab-content">' . PHP_EOL; $return .= ' <div class="tab-pane active" id="tab1">' . PHP_EOL; $return .= ' <p>I\'m in Section 1.</p>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="tab-pane" id="tab2">' . PHP_EOL; $return .= ' <p>Howdy, I\'m in Section 2.</p>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Fade in tabs</h4>'; $return .= '<p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p>'; $return .= '<h4>Requires jQuery plugin</h4>'; $return .= '<p>All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable '; $return .= 'tabs to life <a href="./javascript.html#tabs">on the JavaScript docs page</a>.</p>'; $return .= '<h3>Tabbable in any direction</h3>'; $return .= '<h4>Tabs on the bottom</h4>'; $return .= '<p>Flip the order of the HTML and add a class to put tabs on the bottom.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="tabbable tabs-below">'; $return .= '<div class="tab-content">'; $return .= '<div class="tab-pane active" id="A">'; $return .= '<p>I\'m in Section A.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="B">'; $return .= '<p>Howdy, I\'m in Section B.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="C">'; $return .= '<p>What up girl, this is Section C.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#A" data-toggle="tab">Section 1</a></li>'; $return .= '<li><a href="#B" data-toggle="tab">Section 2</a></li>'; $return .= '<li><a href="#C" data-toggle="tab">Section 3</a></li>'; $return .= '</ul>'; $return .= '</div> <!-- /tabbable -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="tabbable tabs-below">' . PHP_EOL; $return .= ' <div class="tab-content">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <ul class="nav nav-tabs">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Tabs on the left</h4>'; $return .= '<p>Swap the class to put tabs on the left.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="tabbable tabs-left">'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#lA" data-toggle="tab">Section 1</a></li>'; $return .= '<li><a href="#lB" data-toggle="tab">Section 2</a></li>'; $return .= '<li><a href="#lC" data-toggle="tab">Section 3</a></li>'; $return .= '</ul>'; $return .= '<div class="tab-content">'; $return .= '<div class="tab-pane active" id="lA">'; $return .= '<p>I\'m in Section A.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="lB">'; $return .= '<p>Howdy, I\'m in Section B.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="lC">'; $return .= '<p>What up girl, this is Section C.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div> <!-- /tabbable -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="tabbable tabs-left">' . PHP_EOL; $return .= ' <ul class="nav nav-tabs">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' <div class="tab-content">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Tabs on the right</h4>'; $return .= '<p>Swap the class to put tabs on the right.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="tabbable tabs-right">'; $return .= '<ul class="nav nav-tabs">'; $return .= '<li class="active"><a href="#rA" data-toggle="tab">Section 1</a></li>'; $return .= '<li><a href="#rB" data-toggle="tab">Section 2</a></li>'; $return .= '<li><a href="#rC" data-toggle="tab">Section 3</a></li>'; $return .= '</ul>'; $return .= '<div class="tab-content">'; $return .= '<div class="tab-pane active" id="rA">'; $return .= '<p>I\'m in Section A.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="rB">'; $return .= '<p>Howdy, I\'m in Section B.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane" id="rC">'; $return .= '<p>What up girl, this is Section C.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div> <!-- /tabbable -->'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="tabbable tabs-right">' . PHP_EOL; $return .= ' <ul class="nav nav-tabs">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' <div class="tab-content">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Navbar'; $return .= '================================================== -->'; $return .= '<section id="navbar">'; $return .= '<div class="page-header">'; $return .= '<h1>Navbar</h1>'; $return .= '</div>'; $return .= ''; $return .= ''; $return .= '<h2>Basic navbar</h2>'; $return .= '<p>To start, navbars are static (not fixed to the top) and include support for a project name and basic '; $return .= 'navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and '; $return .= 'content.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="navbar">' . PHP_EOL; $return .= ' <div class="navbar-inner">' . PHP_EOL; $return .= ' <a class="brand" href="#">Title</a>' . PHP_EOL; $return .= ' <ul class="nav">' . PHP_EOL; $return .= ' <li class="active"><a href="#">Home</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Link</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Link</a></li>' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Navbar components</h2>'; $return .= '<h3>Brand</h3>'; $return .= '<p>A simple link to show your brand or project name only requires an anchor tag.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<a class="brand" href="#">Project name</a>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Nav links</h3>'; $return .= '<p>Nav items are simple to add via unordered lists.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav">' . PHP_EOL; $return .= ' <li class="active">' . PHP_EOL; $return .= ' <a href="#">Home</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' <li><a href="#">Link</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Link</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>You can easily add dividers to your nav links with an empty list item and a simple class. Just add this '; $return .= 'between links:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li class="divider-vertical"></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li class="divider-vertical"></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li class="divider-vertical"></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' <li class="divider-vertical"></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Forms</h3>'; $return .= '<p>To properly style and position a form within the navbar, add the appropriate classes as shown below. For'; $return .= 'a default form, include <code>.navbar-form</code> and either <code>.pull-left</code> or <code>.pull-right'; $return .= '</code> to properly align it.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<form class="navbar-form pull-left">'; $return .= '<input type="text" class="span2">'; $return .= '<button type="submit" class="btn">Submit</button>'; $return .= '</form>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="navbar-form pull-left">' . PHP_EOL; $return .= ' <input type="text" class="span2">' . PHP_EOL; $return .= ' <button type="submit" class="btn">Submit</button>' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Search form</h3>'; $return .= '<p>For a more customized search form, add <code>.navbar-search</code> to the <code>form</code> and <code>'; $return .= '.search-query</code> to the input for specialized styles in the navbar.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<form class="navbar-search pull-left">'; $return .= '<input type="text" class="search-query" placeholder="Search">'; $return .= '</form>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<form class="navbar-search pull-left">' . PHP_EOL; $return .= ' <input type="text" class="search-query" placeholder="Search">' . PHP_EOL; $return .= '</form>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Component alignment</h3>'; $return .= '<p>Align nav links, search form, or text, use the <code>.pull-left</code> or <code>.pull-right</code> '; $return .= 'utility classes. Both classes will add a CSS float in the specified direction.</p>'; $return .= '<h3>Using dropdowns</h3>'; $return .= '<p>Add dropdowns and dropups to the nav with a bit of markup and the <a href="./javascript.html#dropdowns">'; $return .= 'dropdowns JavaScript plugin</a>.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav">' . PHP_EOL; $return .= ' <li class="dropdown">' . PHP_EOL; $return .= ' <a href="#" class="dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; $return .= ' Account' . PHP_EOL; $return .= ' <b class="caret"></b>' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>Visit the <a href="./javascript.html#dropdowns">JavaScript dropdowns documentation</a> for more markup '; $return .= 'and information on calling dropdowns.</p>'; $return .= '<h3>Text</h3>'; $return .= '<p>Wrap strings of text in an element with <code>.navbar-text</code>, usually on a <code><p></code> tag '; $return .= 'for proper leading and color.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Optional display variations</h2>'; $return .= '<p>Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, '; $return .= '<code>.navbar</code>.</p>'; $return .= '<h3>Fixed to top</h3>'; $return .= '<p>Add <code>.navbar-fixed-top</code> and remember to account for the hidden area underneath it by adding '; $return .= 'at least 40px <code>padding</code> to the <code><body></code>. Be sure to add this after the core '; $return .= 'Bootstrap CSS and before the optional responsive CSS.</p>'; $return .= '<div class="bs-docs-example bs-navbar-top-example">'; $return .= '<div class="navbar navbar-fixed-top" style="position: absolute;">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container" style="width: auto; padding: 0 20px;">'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="navbar navbar-fixed-top">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Fixed to bottom</h3>'; $return .= '<p>Add <code>.navbar-fixed-bottom</code> instead.</p>'; $return .= '<div class="bs-docs-example bs-navbar-bottom-example">'; $return .= '<div class="navbar navbar-fixed-bottom" style="position: absolute;">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container" style="width: auto; padding: 0 20px;">'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="navbar navbar-fixed-bottom">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Static top navbar</h3>'; $return .= '<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code>'; $return .= '. Unlike the <code>.navbar-fixed-top</code> class, you do not need to change any padding on the <code>'; $return .= 'body</code>.</p>'; $return .= '<div class="bs-docs-example bs-navbar-top-example">'; $return .= '<div class="navbar navbar-static-top" style="margin: -1px -1px 0;">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container" style="width: auto; padding: 0 20px;">'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<ul class="nav">'; $return .= '<li class="active"><a href="#">Home</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '<li><a href="#">Link</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">' . PHP_EOL; $return .= '<div class="navbar navbar-static-top">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Responsive navbar</h2>'; $return .= '<p>To implement a collapsing responsive navbar, wrap your navbar content in a containing div, <code>'; $return .= '.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container">'; $return .= '<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">'; $return .= '<span class="icon-bar"></span>'; $return .= '<span class="icon-bar"></span>'; $return .= '<span class="icon-bar"></span>'; $return .= '</a>'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<div class="nav-collapse collapse navbar-responsive-collapse">'; $return .= $this->nav(); $return .= '<div class="navbar">' . PHP_EOL; $return .= ' <div class="navbar-inner">' . PHP_EOL; $return .= ' <div class="container">' . PHP_EOL . PHP_EOL; $return .= ' <!-- .btn-navbar is used as the toggle for collapsed navbar content -->' . PHP_EOL; $return .= ' <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">' . PHP_EOL; $return .= ' <span class="icon-bar"></span>' . PHP_EOL; $return .= ' <span class="icon-bar"></span>' . PHP_EOL; $return .= ' <span class="icon-bar"></span>' . PHP_EOL; $return .= ' </a>' . PHP_EOL . PHP_EOL; $return .= ' <!-- Be sure to leave the brand out there if you want it shown -->' . PHP_EOL; $return .= ' <a class="brand" href="#">Project name</a>' . PHP_EOL . PHP_EOL; $return .= ' <!-- Everything you want hidden at 940px or less, place within here -->' . PHP_EOL; $return .= ' <div class="nav-collapse collapse">' . PHP_EOL; $return .= ' <!-- .nav, .navbar-search, .navbar-form, etc -->' . PHP_EOL . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong> The responsive navbar requires the <a href="./javascript.html#collapse">'; $return .= 'collapse plugin</a> and <a href="./scaffolding.html#responsive">responsive Bootstrap CSS file</a>.'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Inverted variation</h2>'; $return .= '<p>Modify the look of the navbar by adding <code>.navbar-inverse</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="navbar navbar-inverse" style="position: static;">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container">'; $return .= '<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-collapse">'; $return .= '<span class="icon-bar"></span>'; $return .= '<span class="icon-bar"></span>'; $return .= '<span class="icon-bar"></span>'; $return .= '</a>'; $return .= '<a class="brand" href="#">Title</a>'; $return .= '<div class="nav-collapse collapse navbar-inverse-collapse">'; $return .= $this->nav(); $return .= '<div class="navbar navbar-inverse">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Breadcrumbs'; $return .= '================================================== -->'; $return .= '<section id="breadcrumbs">'; $return .= '<div class="page-header">'; $return .= '<h1>Breadcrumbs <small></small></h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>A single example shown as it might be displayed across multiple pages.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="breadcrumb">'; $return .= '<li class="active">Home</li>'; $return .= '</ul>'; $return .= '<ul class="breadcrumb">'; $return .= '<li><a href="#">Home</a> <span class="divider">/</span></li>'; $return .= '<li class="active">Library</li>'; $return .= '</ul>'; $return .= '<ul class="breadcrumb" style="margin-bottom: 5px;">'; $return .= '<li><a href="#">Home</a> <span class="divider">/</span></li>'; $return .= '<li><a href="#">Library</a> <span class="divider">/</span></li>'; $return .= '<li class="active">Data</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="breadcrumb">' . PHP_EOL; $return .= ' <li><a href="#">Home</a> <span class="divider">/</span></li>' . PHP_EOL; $return .= ' <li><a href="#">Library</a> <span class="divider">/</span></li>' . PHP_EOL; $return .= ' <li class="active">Data</li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Pagination'; $return .= '================================================== -->'; $return .= '<section id="pagination">'; $return .= '<div class="page-header">'; $return .= '<h1>Pagination <small>Two options for paging through content</small></h1>'; $return .= '</div>'; $return .= '<h2>Standard pagination</h2>'; $return .= '<p>Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, '; $return .= 'easily scalable, and provides large click areas.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="pagination">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' <li><a href="#">Prev</a></li>' . PHP_EOL; $return .= ' <li><a href="#">1</a></li>' . PHP_EOL; $return .= ' <li><a href="#">2</a></li>' . PHP_EOL; $return .= ' <li><a href="#">3</a></li>' . PHP_EOL; $return .= ' <li><a href="#">4</a></li>' . PHP_EOL; $return .= ' <li><a href="#">5</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Next</a></li>' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Options</h2>'; $return .= '<h3>Disabled and active states</h3>'; $return .= '<p>Links are customizable for different circumstances. Use <code>.disabled</code> for unclickable links '; $return .= 'and <code>.active</code> to indicate the current page.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="pagination pagination-centered">'; $return .= '<ul>'; $return .= '<li class="disabled"><a href="#">«</a></li>'; $return .= '<li class="active"><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' <li class="disabled"><a href="#">&laquo;</a></li>' . PHP_EOL; $return .= ' <li class="active"><a href="#">1</a></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>You can optionally swap out active or disabled anchors for spans to remove click functionality '; $return .= 'while retaining intended styles.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' <li class="disabled"><span>&laquo;</span></li>' . PHP_EOL; $return .= ' <li class="active"><span>1</span></li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Sizes</h3>'; $return .= '<p>Fancy larger or smaller pagination? Add <code>.pagination-large</code>, <code>.pagination-small'; $return .= '</code>, or <code>.pagination-mini</code> for additional sizes.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="pagination pagination-large">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<div class="pagination">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<div class="pagination pagination-small">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<div class="pagination pagination-mini">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination pagination-large">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="pagination">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="pagination pagination-small">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="pagination pagination-mini">' . PHP_EOL; $return .= ' <ul>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Alignment</h3>'; $return .= '<p>Add one of two optional classes to change the alignment of pagination links: <code>'; $return .= '.pagination-centered</code> and <code>.pagination-right</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="pagination pagination-centered">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination pagination-centered">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="pagination pagination-right">'; $return .= '<ul>'; $return .= '<li><a href="#">«</a></li>'; $return .= '<li><a href="#">1</a></li>'; $return .= '<li><a href="#">2</a></li>'; $return .= '<li><a href="#">3</a></li>'; $return .= '<li><a href="#">4</a></li>'; $return .= '<li><a href="#">5</a></li>'; $return .= '<li><a href="#">»</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="pagination pagination-right">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Pager</h2>'; $return .= '<p>Quick previous and next links for simple pagination implementations with light markup and styles'; $return .= '. It\'s great for simple sites like blogs or magazines.</p>'; $return .= '<h3>Default example</h3>'; $return .= '<p>By default, the pager centers links.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="pager">'; $return .= '<li><a href="#">Previous</a></li>'; $return .= '<li><a href="#">Next</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="pager">' . PHP_EOL; $return .= ' <li><a href="#">Previous</a></li>' . PHP_EOL; $return .= ' <li><a href="#">Next</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Aligned links</h3>'; $return .= '<p>Alternatively, you can align each link to the sides:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="pager">'; $return .= '<li class="previous"><a href="#">← Older</a></li>'; $return .= '<li class="next"><a href="#">Newer →</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="pager">' . PHP_EOL; $return .= ' <li class="previous">' . PHP_EOL; $return .= ' <a href="#">&larr; Older</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' <li class="next">' . PHP_EOL; $return .= ' <a href="#">Newer &rarr;</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Optional disabled state</h3>'; $return .= '<p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="pager">'; $return .= '<li class="previous disabled"><a href="#">← Older</a></li>'; $return .= '<li class="next"><a href="#">Newer →</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="pager">' . PHP_EOL; $return .= ' <li class="previous disabled">' . PHP_EOL; $return .= ' <a href="#">&larr; Older</a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Labels and badges'; $return .= '================================================== -->'; $return .= '<section id="labels-badges">'; $return .= '<div class="page-header">'; $return .= '<h1>Labels and badges</h1>'; $return .= '</div>'; $return .= '<h3>Labels</h3>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Labels</th>'; $return .= '<th>Markup</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label">Default</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label">Default</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label label-success">Success</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label label-success">Success</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label label-warning">Warning</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label label-warning">Warning</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label label-important">Important</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label label-important">Important</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label label-info">Info</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label label-info">Info</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= '<span class="label label-inverse">Inverse</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="label label-inverse">Inverse</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Badges</h3>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th>Name</th>'; $return .= '<th>Example</th>'; $return .= '<th>Markup</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Default'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge">1</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge">1</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Success'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge badge-success">2</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge badge-success">2</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Warning'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge badge-warning">4</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge badge-warning">4</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Important'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge badge-important">6</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge badge-important">6</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Info'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge badge-info">8</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge badge-info">8</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>'; $return .= 'Inverse'; $return .= '</td>'; $return .= '<td>'; $return .= '<span class="badge badge-inverse">10</span>'; $return .= '</td>'; $return .= '<td>'; $return .= '<code><span class="badge badge-inverse">10</span></code>'; $return .= '</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Easily collapsible</h3>'; $return .= '<p>For easy implementation, labels and badges will simply collapse (via CSS\'s <code>:empty</code> selector'; $return .= ') when no content exists within.</p>'; $return .= '</section>'; $return .= '<!-- Typographic components'; $return .= '================================================== -->'; $return .= '<section id="typography">'; $return .= '<div class="page-header">'; $return .= '<h1>Typographic components</h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Hero unit</h2>'; $return .= '<p>A lightweight, flexible component to showcase key content on your site. It works well on marketing and '; $return .= 'content-heavy sites.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="hero-unit">'; $return .= '<h1>Hello, world!</h1>'; $return .= '<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured '; $return .= 'content or information.</p>'; $return .= '<p><a class="btn btn-primary btn-large">Learn more</a></p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="hero-unit">' . PHP_EOL; $return .= ' <h1>Heading</h1>' . PHP_EOL; $return .= ' <p>Tagline</p>' . PHP_EOL; $return .= ' <p>' . PHP_EOL; $return .= ' <a class="btn btn-primary btn-large">' . PHP_EOL; $return .= ' Learn more' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' </p>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Page header</h2>'; $return .= '<p>A simple shell for an <code>h1</code> to appropriately space out and segment sections of content on a page'; $return .= '. It can utilize the <code>h1</code>\'s default <code>small</code>, element as well most other components '; $return .= '(with additional styles).</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="page-header">'; $return .= '<h1>Example page header <small>Subtext for header</small></h1>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="page-header">' . PHP_EOL; $return .= ' <h1>Example page header <small>Subtext for header</small></h1>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Thumbnails'; $return .= '================================================== -->'; $return .= '<section id="thumbnails">'; $return .= '<div class="page-header">'; $return .= '<h1>Thumbnails <small>Grids of images, videos, text, and more</small></h1>'; $return .= '</div>'; $return .= '<h2>Default thumbnails</h2>'; $return .= '<p>By default, Bootstrap\'s thumbnails are designed to showcase linked images with minimal required '; $return .= 'markup.</p>'; $return .= '<div class="row-fluid">'; $return .= '<ul class="thumbnails">'; $return .= $this->fourthumbnails(); $return .= '</ul>'; $return .= '</div>'; $return .= '<h2>Highly customizable</h2>'; $return .= '<p>With a bit of extra markup, it\'s possible to add any kind of HTML content like headings, paragraphs, or '; $return .= 'buttons into thumbnails.</p>'; $return .= '<div class="row-fluid">'; $return .= '<ul class="thumbnails">'; $return .= $this->threethumbnails(); $return .= '</ul>'; $return .= '</div>'; $return .= '<h3>Why use thumbnails</h3>'; $return .= '<p>Thumbnails (previously <code>.media-grid</code> up until v1.4) are great for grids of photos or '; $return .= 'videos, image search results, retail products, portfolios, and much more. They can be links or static '; $return .= 'content.</p>'; $return .= '<h3>Simple, flexible markup</h3>'; $return .= '<p>Thumbnail markup is simple—a <code>ul</code> with any number of <code>li</code> elements is '; $return .= 'all that is required. It\'s also super flexible, allowing for any type of content with just a bit '; $return .= 'more markup to wrap your contents.</p>'; $return .= '<h3>Uses grid column sizes</h3>'; $return .= '<p>Lastly, the thumbnails component uses existing grid system classes—like <code>.span2</code> '; $return .= 'or <code>.span3</code>—for control of thumbnail dimensions.</p>'; $return .= '<h2>Markup</h2>'; $return .= '<p>As mentioned previously, the required markup for thumbnails is light and straightforward. Here\'s '; $return .= 'a look at the default setup <strong>for linked images</strong>:</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="thumbnails">' . PHP_EOL; $return .= ' <li class="span4">' . PHP_EOL; $return .= ' <a href="#" class="thumbnail">' . PHP_EOL; $return .= ' <img data-src="holder.js/300x200" alt="">' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>For custom HTML content in thumbnails, the markup changes slightly. To allow block level content '; $return .= 'anywhere, we swap the <code><a></code> for a <code><div></code> like so:</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="thumbnails">' . PHP_EOL; $return .= ' <li class="span4">' . PHP_EOL; $return .= ' <div class="thumbnail">' . PHP_EOL; $return .= ' <img data-src="holder.js/300x200" alt="">' . PHP_EOL; $return .= ' <h3>Thumbnail label</h3>' . PHP_EOL; $return .= ' <p>Thumbnail caption...</p>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>More examples</h2>'; $return .= '<p>Explore all your options with the various grid classes available to you. You can also mix and match '; $return .= 'different sizes.</p>'; $return .= '<ul class="thumbnails row-fluid">'; $return .= '<li class="span5">'; $return .= '<a href="#" class="thumbnail">'; $return .= '<div class="thumbnail-container">'; $return .= $this->threesixtytwoseventy(); $return .= '</div>'; $return .= '</a>'; $return .= '</li>'; $return .= '<li class="span4">'; $return .= '<a href="#" class="thumbnail">'; $return .= '<div class="thumbnail-container">'; $return .= $this->twosixtyonetwenty(); $return .= '</div>'; $return .= '</a>'; $return .= '</li>'; $return .= '<li class="span3">'; $return .= '<a href="#" class="thumbnail">'; $return .= '<div class="thumbnail-container">'; $return .= $this->onesixtyonetwenty(); $return .= '</div>'; $return .= '</a>'; $return .= '</li>'; $return .= '<li class="span4">'; $return .= '<a href="#" class="thumbnail">'; $return .= '<div class="thumbnail-container">'; $return .= $this->twosixtyonetwenty(); $return .= '</div>'; $return .= '</a>'; $return .= '</li>'; $return .= '<li class="span3">'; $return .= '<a href="#" class="thumbnail">'; $return .= '<div class="thumbnail-container">'; $return .= $this->onesixtyonetwenty(); $return .= '</div>'; $return .= '</a>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</section>'; $return .= '<!-- Alerts'; $return .= '================================================== -->'; $return .= '<section id="alerts">'; $return .= '<div class="page-header">'; $return .= '<h1>Alerts <small>Styles for success, warning, and error messages</small></h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Default alert</h2>'; $return .= '<p>Wrap any text and an optional dismiss button in <code>.alert</code> for a basic warning alert message.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<strong>Warning!</strong> Best check yo self, you\'re not looking too good.'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="alert">' . PHP_EOL; $return .= ' <button type="button" class="close" data-dismiss="alert">&times;</button>' . PHP_EOL; $return .= ' <strong>Warning!</strong> Best check yo self, you\'re not looking too good.' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Dismiss buttons</h3>'; $return .= '<p>Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, '; $return .= 'require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.</p>'; $return .= '<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">&times;</a>'; $return .= '</pre>'; $return .= '<p>Alternatively, you may use a <code><button></code> element with the data attribute, which we have '; $return .= 'opted to do for our docs. When using <code><button></code>, you must include <code>type="button"'; $return .= '</code> or your forms may not submit.</p>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">&times;'; $return .= '</button></pre>'; $return .= '<h3>Dismiss alerts via JavaScript</h3>'; $return .= '<p>Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of '; $return .= 'alerts.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Options</h2>'; $return .= '<p>For longer messages, increase the padding on the top and bottom of the alert wrapper by adding <code>'; $return .= '.alert-block</code>.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert alert-block">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<h4>Warning!</h4>'; $return .= '<p>Best check yo self, you\'re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent '; $return .= 'commodo cursus magna, vel scelerisque nisl consectetur et.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="alert alert-block">' . PHP_EOL; $return .= ' <button type="button" class="close" data-dismiss="alert">&times;</button>' . PHP_EOL; $return .= ' <h4>Warning!</h4>' . PHP_EOL; $return .= ' Best check yo self, you\'re not...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Contextual alternatives</h2>'; $return .= '<p>Add optional classes to change an alert\'s connotation.</p>'; $return .= '<h3>Error or danger</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert alert-error">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<strong>Oh snap!</strong> Change a few things up and try submitting again.'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="alert alert-error">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Success</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert alert-success">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<strong>Well done!</strong> You successfully read this important alert message.'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="alert alert-success">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>' . PHP_EOL; $return .= '<h3>Information</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert alert-info">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<strong>Heads up!</strong> This alert needs your attention, but it\'s not super important.'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="alert alert-info">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Progress bars'; $return .= '================================================== -->'; $return .= '<section id="progress">'; $return .= '<div class="page-header">'; $return .= '<h1>Progress bars <small>For loading, redirecting, or action status</small></h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Examples and markup</h2>'; $return .= ''; $return .= '<h3>Basic</h3>'; $return .= '<p>Default progress bar with a vertical gradient.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress">'; $return .= '<div class="bar" style="width: 60%;"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress">' . PHP_EOL; $return .= ' <div class="bar" style="width: 60%;"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Striped</h3>'; $return .= '<p>Uses a gradient to create a striped effect. Not available in IE7-8.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress progress-striped">'; $return .= '<div class="bar" style="width: 20%;"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress progress-striped">' . PHP_EOL; $return .= ' <div class="bar" style="width: 20%;"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Animated</h3>'; $return .= '<p>Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right '; $return .= 'to left. Not available in all versions of IE.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress progress-striped active">'; $return .= '<div class="bar" style="width: 45%"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress progress-striped active">' . PHP_EOL; $return .= ' <div class="bar" style="width: 40%;"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Stacked</h3>'; $return .= '<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress">'; $return .= '<div class="bar bar-success" style="width: 35%"></div>'; $return .= '<div class="bar bar-warning" style="width: 20%"></div>'; $return .= '<div class="bar bar-danger" style="width: 10%"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress">' . PHP_EOL; $return .= ' <div class="bar bar-success" style="width: 35%;"></div>' . PHP_EOL; $return .= ' <div class="bar bar-warning" style="width: 20%;"></div>' . PHP_EOL; $return .= ' <div class="bar bar-danger" style="width: 10%;"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>' . PHP_EOL; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Options</h2>'; $return .= '<h3>Additional colors</h3>'; $return .= '<p>Progress bars use some of the same button and alert classes for consistent styles.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress progress-info" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 20%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-success" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 40%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-warning" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 60%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-danger">'; $return .= '<div class="bar" style="width: 80%"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress progress-info">' . PHP_EOL; $return .= ' <div class="bar" style="width: 20%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-success">' . PHP_EOL; $return .= ' <div class="bar" style="width: 40%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-warning">' . PHP_EOL; $return .= ' <div class="bar" style="width: 60%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-danger">' . PHP_EOL; $return .= ' <div class="bar" style="width: 80%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Striped bars</h3>'; $return .= '<p>Similar to the solid colors, we have varied striped progress bars.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="progress progress-info progress-striped" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 20%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-success progress-striped" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 40%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-warning progress-striped" style="margin-bottom: 9px;">'; $return .= '<div class="bar" style="width: 60%"></div>'; $return .= '</div>'; $return .= '<div class="progress progress-danger progress-striped">'; $return .= '<div class="bar" style="width: 80%"></div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="progress progress-info progress-striped">' . PHP_EOL; $return .= ' <div class="bar" style="width: 20%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-success progress-striped">' . PHP_EOL; $return .= ' <div class="bar" style="width: 40%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-warning progress-striped">' . PHP_EOL; $return .= ' <div class="bar" style="width: 60%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '<div class="progress progress-danger progress-striped">' . PHP_EOL; $return .= ' <div class="bar" style="width: 80%"></div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Browser support</h2>'; $return .= '<p>Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These '; $return .= 'features are not supported in IE7-9 or older versions of Firefox.</p>'; $return .= '<p>Versions earlier than Internet Explorer 10 and Opera 12 do not support animations.</p>'; $return .= '</section>'; $return .= '<!-- Media object'; $return .= '================================================== -->'; $return .= '<section id="media">'; $return .= '<div class="page-header">'; $return .= '<h1>Media object</h1>'; $return .= '</div>'; $return .= '<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets,'; $return .= 'etc) that feature a left- or right-aligned image alongside textual content.</p>'; $return .= ''; $return .= '<h2>Default example</h2>'; $return .= '<p>The default media allow to float a media object (images, video, audio) to the left or right of a content '; $return .= 'block.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate '; $return .= 'fringilla. Donec lacinia congue felis in faucibus.'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate '; $return .= 'fringilla. Donec lacinia congue felis in faucibus.'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate '; $return .= 'fringilla. Donec lacinia congue felis in faucibus.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="media">' . PHP_EOL; $return .= ' <a class="pull-left" href="#">' . PHP_EOL; $return .= ' <img class="media-object" data-src="holder.js/64x64">' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <div class="media-body">' . PHP_EOL; $return .= ' <h4 class="media-heading">Media heading</h4>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' <!-- Nested media object -->' . PHP_EOL; $return .= ' <div class="media">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Media list</h2>'; $return .= '<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists)'; $return .= '.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="media-list">'; $return .= '<li class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Media heading</h4>'; $return .= '<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>'; $return .= '<!-- Nested media object -->'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Nested media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis.'; $return .= '<!-- Nested media object -->'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Nested media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<!-- Nested media object -->'; $return .= '<div class="media">'; $return .= '<a class="pull-left" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Nested media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</li>'; $return .= '<li class="media">'; $return .= '<a class="pull-right" href="#">'; $return .= $this->sixtyfoursixtyfour(); $return .= '</a>'; $return .= '<div class="media-body">'; $return .= '<h4 class="media-heading">Media heading</h4>'; $return .= 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras '; $return .= 'purus odio, vestibulum in vulputate at, tempus viverra turpis.'; $return .= '</div>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="media-list">' . PHP_EOL; $return .= ' <li class="media">' . PHP_EOL; $return .= ' <a class="pull-left" href="#">' . PHP_EOL; $return .= ' <img class="media-object" data-src="holder.js/64x64">' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <div class="media-body">' . PHP_EOL; $return .= ' <h4 class="media-heading">Media heading</h4>' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '' . PHP_EOL; $return .= ' <!-- Nested media object -->' . PHP_EOL; $return .= ' <div class="media">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Miscellaneous'; $return .= '================================================== -->'; $return .= '<section id="misc">'; $return .= '<div class="page-header">'; $return .= '<h1>Miscellaneous <small>Lightweight utility components</small></h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Wells</h2>'; $return .= '<p>Use the well as a simple effect on an element to give it an inset effect.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="well">'; $return .= 'Look, I\'m in a well!'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="well">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Optional classes</h3>'; $return .= '<p>Control padding and rounded corners with two optional modifier classes.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="well well-large">'; $return .= 'Look, I\'m in a well!'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="well well-large">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="well well-small">'; $return .= 'Look, I\'m in a well!'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="well well-small">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h2>Close icon</h2>'; $return .= '<p>Use the generic close icon for dismissing content like modals and alerts.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<p><button class="close" style="float: none;">×</button></p>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums"><button class="close">&times;</button></pre>'; $return .= '<p>iOS devices require an <code>href="#"</code> for click events if you would rather use an anchor.</p>'; $return .= '<pre class="prettyprint linenums"><a class="close" href="#">&times;</a></pre>'; $return .= ''; $return .= '<h2>Helper classes</h2>'; $return .= '<p>Simple, focused classes for small display or behavior tweaks.</p>'; $return .= ''; $return .= '<h4>.pull-left</h4>'; $return .= '<p>Float an element left</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'class="pull-left"' . PHP_EOL; $return .= '</pre>'; $return .= '<pre class="prettyprint linenums">'; $return .= '.pull-left {' . PHP_EOL; $return .= ' float: left;' . PHP_EOL; $return .= '}' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.pull-right</h4>'; $return .= '<p>Float an element right</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'class="pull-right"' . PHP_EOL; $return .= '</pre>'; $return .= '<pre class="prettyprint linenums">'; $return .= '.pull-right {' . PHP_EOL; $return .= ' float: right;' . PHP_EOL; $return .= '}' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.muted</h4>'; $return .= '<p>Change an element\'s color to <code>#999</code></p>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'class="muted"' . PHP_EOL; $return .= '</pre>'; $return .= '<pre class="prettyprint linenums">'; $return .= '.muted {' . PHP_EOL; $return .= ' color: #999;' . PHP_EOL; $return .= '}' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.clearfix</h4>'; $return .= '<p>Clear the <code>float</code> on any element</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'class="clearfix"' . PHP_EOL; $return .= '</pre>'; $return .= '<pre class="prettyprint linenums">'; $return .= '.clearfix {' . PHP_EOL; $return .= ' *zoom: 1;' . PHP_EOL; $return .= ' &:before,' . PHP_EOL; $return .= ' &:after {' . PHP_EOL; $return .= ' display: table;' . PHP_EOL; $return .= ' content: "";' . PHP_EOL; $return .= ' }' . PHP_EOL; $return .= ' &:after {' . PHP_EOL; $return .= ' clear: both;' . PHP_EOL; $return .= ' }' . PHP_EOL; $return .= '}' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- JavaScript overview'; $return .= '================================================== -->'; $return .= '<section id="overview">'; $return .= '<div class="page-header">'; $return .= '<h1>JavaScript in Bootstrap</h1>'; $return .= '</div>'; $return .= '<h3>Individual or compiled</h3>'; $return .= '<p>Plugins can be included individually (though some have required dependencies), or all at once. Both '; $return .= '<strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all plugins in a single file.</p>'; $return .= '<h3>Data attributes</h3>'; $return .= '<p>You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript'; $return .= '. This is Bootstrap\'s first class API and should be your first consideration when using a plugin.</p>'; $return .= '<p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also '; $return .= 'provide the ability to disable the data attribute API by unbinding all events on the body namespaced with '; $return .= '\'data-api\'. This looks like this:'; $return .= '<pre class="prettyprint linenums">$(\'body\').off(\'.data-api\')</pre>'; $return .= '<p>Alternatively, to target a specific plugin, just include the plugin\'s name as a namespace along with the '; $return .= 'data-api namespace like this:</p>'; $return .= '<pre class="prettyprint linenums">$(\'body\').off(\'.alert.data-api\')</pre>'; $return .= '<h3>Programmatic API</h3>'; $return .= '<p>We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All '; $return .= 'public APIs are single, chainable methods, and return the collection acted upon.</p>'; $return .= '<pre class="prettyprint linenums">$(".btn.danger").button("toggle").addClass("fat")</pre>'; $return .= '<p>All methods should accept an optional options object, a string which targets a particular method, or '; $return .= 'nothing (which initiates a plugin with default behavior):</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$("#myModal").modal() // initialized with defaults' . PHP_EOL; $return .= '$("#myModal").modal({ keyboard: false }) // initialized with no keyboard' . PHP_EOL; $return .= '$("#myModal").modal(\'show\') // initializes and invokes show immediately</p>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>Each plugin also exposes its raw constructor on a \'Constructor\' property: <code>$.fn.popover.Constructor'; $return .= '</code>. If you\'d like to get a particular plugin instance, retrieve it directly from an element: <code>'; $return .= '$(\'[rel=popover]\').data(\'popover\')</code>.</p>'; $return .= '<h3>No Conflict</h3>'; $return .= '<p>Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, '; $return .= 'namespace collisions can occasionally occur. If this happens, you may call <code>.noConflict</code> on '; $return .= 'the plugin you wish to revert the value of.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= 'var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value' . PHP_EOL; $return .= '$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the bootstrap functionality' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Events</h3>'; $return .= '<p>Bootstrap provides custom events for most plugin\'s unique actions. Generally, these come in an '; $return .= 'infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at '; $return .= 'the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the '; $return .= 'completion of an action.</p>'; $return .= '<p>All infinitive events provide preventDefault functionality. This provides the ability to stop the '; $return .= 'execution of an action before it starts.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myModal\').on(\'show\', function (e) {' . PHP_EOL; $return .= ' if (!data) return e.preventDefault() // stops modal from being shown' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Transitions'; $return .= '================================================== -->'; $return .= '<section id="transitions">'; $return .= '<div class="page-header">'; $return .= '<h1>Transitions <small>bootstrap-transition.js</small></h1>'; $return .= '</div>'; $return .= '<h3>About transitions</h3>'; $return .= '<p>For simple transition effects, include <strong>bootstrap-transition.js</strong> once alongside the '; $return .= 'other JS files. If you\'re using the compiled (or minified) <strong>bootstrap.js</strong>, there is no '; $return .= 'need to include this—it\'s already there.</p>'; $return .= '<h3>Use cases</h3>'; $return .= '<p>A few examples of the transition plugin:</p>'; $return .= '<ul>'; $return .= '<li>Sliding or fading in modals</li>'; $return .= '<li>Fading out tabs</li>'; $return .= '<li>Fading out alerts</li>'; $return .= '<li>Sliding carousel panes</li>'; $return .= '</ul>'; $return .= '</section>'; $return .= '<!-- Modal'; $return .= '================================================== -->'; $return .= '<section id="modals">'; $return .= '<div class="page-header">'; $return .= '<h1>Modals <small>bootstrap-modal.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart '; $return .= 'defaults.</p>'; $return .= '<h3>Static example</h3>'; $return .= '<p>A rendered modal with header, body, and set of actions in the footer.</p>'; $return .= '<div class="bs-docs-example" style="background-color: #f5f5f5;">'; $return .= '<div class="modal" style="position: relative; top: auto; left: auto; right: auto; margin: 0 auto 20px; '; $return .= 'z-index: 1; max-width: 100%;">'; $return .= '<div class="modal-header">'; $return .= '<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; $return .= '<h3>Modal header</h3>'; $return .= '</div>'; $return .= '<div class="modal-body">'; $return .= '<p>One fine body…</p>'; $return .= '</div>'; $return .= '<div class="modal-footer">'; $return .= '<a href="#" class="btn">Close</a>'; $return .= '<a href="#" class="btn btn-primary">Save changes</a>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="modal hide fade">' . PHP_EOL; $return .= ' <div class="modal-header">' . PHP_EOL; $return .= ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;'; $return .= '</button>' . PHP_EOL; $return .= ' <h3>Modal header</h3>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="modal-body">' . PHP_EOL; $return .= ' <p>One fine body…</p>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="modal-footer">' . PHP_EOL; $return .= ' <a href="#" class="btn">Close</a>' . PHP_EOL; $return .= ' <a href="#" class="btn btn-primary">Save changes</a>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Live demo</h3>'; $return .= '<p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top '; $return .= 'of the page.</p>'; $return .= '<!-- sample modal content -->'; $return .= '<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" '; $return .= 'aria-hidden="true">'; $return .= '<div class="modal-header">'; $return .= '<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; $return .= '<h3 id="myModalLabel">Modal Heading</h3>'; $return .= '</div>'; $return .= '<div class="modal-body">'; $return .= '<h4>Text in a modal</h4>'; $return .= '<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem.</p>'; $return .= '<h4>Popover in a modal</h4>'; $return .= '<p>This <a href="#" role="button" class="btn popover-test" title="A Title" data-content="And here\'s '; $return .= 'some amazing content. It\'s very engaging. right?">button</a> should trigger a popover on click.</p>'; $return .= '<h4>Tooltips in a modal</h4>'; $return .= '<p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" '; $return .= 'title="Tooltip">that link</a> should have tooltips on hover.</p>'; $return .= '<hr>'; $return .= '<h4>Overflowing text to show optional scrollbar</h4>'; $return .= '<p>We set a fixed <code>max-height</code> on the <code>.modal-body</code>. Watch it overflow with all this '; $return .= 'extra lorem ipsum text we\'ve included.</p>'; $return .= '<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget '; $return .= 'quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>'; $return .= '<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue '; $return .= 'laoreet rutrum faucibus dolor auctor.</p>'; $return .= '<p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl '; $return .= 'consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>'; $return .= '<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas '; $return .= 'eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>'; $return .= '<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue '; $return .= 'laoreet rutrum faucibus dolor auctor.</p>'; $return .= '<p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl '; $return .= 'consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>'; $return .= '</div>'; $return .= '<div class="modal-footer">'; $return .= '<button class="btn" data-dismiss="modal">Close</button>'; $return .= '<button class="btn btn-primary">Save changes</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<!-- Button to trigger modal -->' . PHP_EOL; $return .= '<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>' . PHP_EOL; $return .= '' . PHP_EOL; $return .= '<!-- Modal -->' . PHP_EOL; $return .= '<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" '; $return .= 'aria-hidden="true">' . PHP_EOL; $return .= ' <div class="modal-header">' . PHP_EOL; $return .= ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button'; $return .= '>' . PHP_EOL; $return .= ' <h3 id="myModalLabel">Modal header</h3>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="modal-body">' . PHP_EOL; $return .= ' <p>One fine body…</p>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="modal-footer">' . PHP_EOL; $return .= ' <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>' . PHP_EOL; $return .= ' <button class="btn btn-primary">Save changes</button>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>Activate a modal without writing JavaScript. Set <code>data-toggle="modal"</code> on a controller element'; $return .= ', like a button, along with a <code>data-target="#foo"</code> or <code>href="#foo"</code> to target a specifi'; $return .= 'c modal to toggle.</p>'; $return .= '<pre class="prettyprint linenums"><button type="button" data-toggle="modal" data-target="#myModal">'; $return .= 'Launch modal</button></pre>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'#myModal\').modal(options)</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to '; $return .= '<code>data-</code>, as in <code>data-backdrop=""</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 50px;">type</th>'; $return .= '<th style="width: 50px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>backdrop</td>'; $return .= '<td>boolean</td>'; $return .= '<td>true</td>'; $return .= '<td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which '; $return .= 'doesn\'t close the modal on click.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>keyboard</td>'; $return .= '<td>boolean</td>'; $return .= '<td>true</td>'; $return .= '<td>Closes the modal when escape key is pressed</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>show</td>'; $return .= '<td>boolean</td>'; $return .= '<td>true</td>'; $return .= '<td>Shows the modal when initialized.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>remote</td>'; $return .= '<td>path</td>'; $return .= '<td>false</td>'; $return .= '<td><p>If a remote url is provided, content will be loaded via jQuery\'s <code>load</code> method and '; $return .= 'injected into the <code>.modal-body</code>. If you\'re using the data api, you may alternatively use '; $return .= 'the <code>href</code> tag to specify the remote source. An example of this is shown below:</p>'; $return .= '<pre class="prettyprint linenums"><code><a data-toggle="modal" href="remote.html" data-target="#modal'; $return .= '">click me</a></code></pre></td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>.modal(options)</h4>'; $return .= '<p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myModal\').modal({' . PHP_EOL; $return .= ' keyboard: false' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.modal(\'toggle\')</h4>'; $return .= '<p>Manually toggles a modal.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#myModal\').modal(\'toggle\')</pre>'; $return .= '<h4>.modal(\'show\')</h4>'; $return .= '<p>Manually opens a modal.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#myModal\').modal(\'show\')</pre>'; $return .= '<h4>.modal(\'hide\')</h4>'; $return .= '<p>Manually hides a modal.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#myModal\').modal(\'hide\')</pre>'; $return .= '<h3>Events</h3>'; $return .= '<p>Bootstrap\'s modal class exposes a few events for hooking into modal functionality.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>show</td>'; $return .= '<td>This event fires immediately when the <code>show</code> instance method is called.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>shown</td>'; $return .= '<td>This event is fired when the modal has been made visible to the user (will wait for css '; $return .= 'transitions to complete).</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>hide</td>'; $return .= '<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>hidden</td>'; $return .= '<td>This event is fired when the modal has finished being hidden from the user (will wait for css '; $return .= 'transitions to complete).</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myModal\').on(\'hidden\', function () {' . PHP_EOL; $return .= ' // do something…' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Dropdowns'; $return .= '================================================== -->'; $return .= '<section id="dropdowns">'; $return .= '<div class="page-header">'; $return .= '<h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p>'; $return .= '<h3>Within a navbar</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<div id="navbar-example" class="navbar navbar-static">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container" style="width: auto;">'; $return .= '<a class="brand" href="#">Project Name</a>'; $return .= '<ul class="nav" role="navigation">'; $return .= '<li class="dropdown">'; $return .= '<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '<li class="dropdown">'; $return .= '<a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '<ul class="nav pull-right">'; $return .= '<li id="fat-menu" class="dropdown">'; $return .= '<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div> <!-- /navbar-example -->'; $return .= '</div>'; $return .= '<h3>Within tabs</h3>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul class="nav nav-pills">'; $return .= '<li class="active"><a href="#">Regular link</a></li>'; $return .= '<li class="dropdown">'; $return .= '<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '<li class="dropdown">'; $return .= '<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '<li class="dropdown">'; $return .= '<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="'; $return .= 'caret"></b></a>'; $return .= '<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>'; $return .= '<li role="presentation" class="divider"></li>'; $return .= '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul> <!-- /tabs -->'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="dropdown">' . PHP_EOL; $return .= ' <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown trigger</a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="dropdown">' . PHP_EOL; $return .= ' <a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="'; $return .= '/page.html">' . PHP_EOL; $return .= ' Dropdown' . PHP_EOL; $return .= ' <b class="caret"></b>' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">' . PHP_EOL; $return .= ' ...' . PHP_EOL; $return .= ' </ul>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call the dropdowns via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'.dropdown-toggle\').dropdown()</pre>'; $return .= ''; $return .= '<h3>Options</h3>'; $return .= '<p><em>None</em></p>'; $return .= ''; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().dropdown(\'toggle\')</h4>'; $return .= '<p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p>'; $return .= '</section>'; $return .= '<!-- ScrollSpy'; $return .= '================================================== -->'; $return .= '<section id="scrollspy">'; $return .= '<div class="page-header">'; $return .= '<h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example in navbar</h2>'; $return .= '<p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area '; $return .= 'below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div id="navbarExample" class="navbar navbar-static">'; $return .= '<div class="navbar-inner">'; $return .= '<div class="container" style="width: auto;">'; $return .= '<a class="brand" href="#">Project Name</a>'; $return .= '<ul class="nav">'; $return .= '<li><a href="#fat">@fat</a></li>'; $return .= '<li><a href="#mdo">@mdo</a></li>'; $return .= '<li class="dropdown">'; $return .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#one">one</a></li>'; $return .= '<li><a href="#two">two</a></li>'; $return .= '<li class="divider"></li>'; $return .= '<li><a href="#three">three</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div data-spy="scroll" data-target="#navbarExample" data-offset="0" class="scrollspy-example">'; $return .= '<h4 id="fat">@fat</h4>'; $return .= '<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. '; $return .= 'Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney\'s photo '; $return .= 'booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven\'t '; $return .= 'heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred '; $return .= 'irony biodiesel keffiyeh artisan ullamco consequat.</p>'; $return .= '<h4 id="mdo">@mdo</h4>'; $return .= '<p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua '; $return .= 'cupidatat mcsweeney\'s vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater '; $return .= 'food truck, mcsweeney\'s quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic '; $return .= 'exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>'; $return .= '<h4 id="one">one</h4>'; $return .= '<p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing '; $return .= 'banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo '; $return .= 'park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim '; $return .= 'messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>'; $return .= '<h4 id="two">two</h4>'; $return .= '<p>In incididunt echo park, officia deserunt mcsweeney\'s proident master cleanse thundercats sapiente '; $return .= 'veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee '; $return .= 'wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven\'t '; $return .= 'heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial '; $return .= 'keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four '; $return .= 'loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>'; $return .= '<h4 id="three">three</h4>'; $return .= '<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out '; $return .= 'qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan '; $return .= 'mcsweeney\'s photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim '; $return .= 'qui you probably haven\'t heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. '; $return .= 'Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>'; $return .= '<p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. '; $return .= 'Locavore sed helvetica cliche irony, thundercats you probably haven\'t heard of them consequat hoodie '; $return .= 'gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident '; $return .= 'brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan '; $return .= 'readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.'; $return .= '</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>To easily add scrollspy behavior to your topbar navigation, just add <code>data-spy="scroll"</code> '; $return .= 'to the element you want to spy on (most typically this would be the body) and <code>data-target=".navbar"'; $return .= '</code> to select which nav to use. You\'ll want to use scrollspy with a <code>.nav</code> component.</p>'; $return .= '<pre class="prettyprint linenums"><body data-spy="scroll" data-target=".navbar">...</body></pre>'; $return .= ''; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call the scrollspy via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'#navbar\').scrollspy()</pre>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= 'Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a>'; $return .= '</code> must correspond to something in the dom like <code><div id="home"></div></code>.'; $return .= '</div>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>.scrollspy(\'refresh\')</h4>'; $return .= '<p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you\'ll '; $return .= 'need to call the refresh method like so:</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'[data-spy="scroll"]\').each(function () {' . PHP_EOL; $return .= ' var $spy = $(this).scrollspy(\'refresh\')' . PHP_EOL; $return .= '});' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option '; $return .= 'name to <code>data-</code>, as in <code>data-offset=""</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 100px;">type</th>'; $return .= '<th style="width: 50px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>offset</td>'; $return .= '<td>number</td>'; $return .= '<td>10</td>'; $return .= '<td>Pixels to offset from top when calculating position of scroll.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Events</h3>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>activate</td>'; $return .= '<td>This event fires whenever a new item becomes activated by the scrollspy.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '</section>'; $return .= '<!-- Tabs'; $return .= '================================================== -->'; $return .= '<section id="tabs">'; $return .= '<div class="page-header">'; $return .= '<h1>Togglable tabs <small>bootstrap-tab.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example tabs</h2>'; $return .= '<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown '; $return .= 'menus.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<ul id="myTab" class="nav nav-tabs">'; $return .= '<li class="active"><a href="#home" data-toggle="tab">Home</a></li>'; $return .= '<li><a href="#profile" data-toggle="tab">Profile</a></li>'; $return .= '<li class="dropdown">'; $return .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>'; $return .= '<ul class="dropdown-menu">'; $return .= '<li><a href="#dropdown1" data-toggle="tab">@fat</a></li>'; $return .= '<li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>'; $return .= '</ul>'; $return .= '</li>'; $return .= '</ul>'; $return .= '<div id="myTabContent" class="tab-content">'; $return .= '<div class="tab-pane fade in active" id="home">'; $return .= '<p>Raw denim you probably haven\'t heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, '; $return .= 'retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit '; $return .= 'butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. '; $return .= 'Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate '; $return .= 'nisi qui.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane fade" id="profile">'; $return .= '<p>Food truck fixie locavore, accusamus mcsweeney\'s marfa nulla single-origin coffee squid. Exercitation '; $return .= '+1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft '; $return .= 'beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl '; $return .= 'cillum PBR. H**o nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS '; $return .= 'salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, '; $return .= 'sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester '; $return .= 'stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane fade" id="dropdown1">'; $return .= '<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney\'s organic lomo retro '; $return .= 'fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone '; $return .= 'skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings '; $return .= 'gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel '; $return .= 'fixie etsy retro mlkshk vice blog. Scenester cred you probably haven\'t heard of them, vinyl craft beer '; $return .= 'blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>'; $return .= '</div>'; $return .= '<div class="tab-pane fade" id="dropdown2">'; $return .= '<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master '; $return .= 'cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party '; $return .= 'locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before '; $return .= 'they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade '; $return .= 'thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myTab a\').click(function (e) {' . PHP_EOL; $return .= ' e.preventDefault();' . PHP_EOL; $return .= ' $(this).tab(\'show\');' . PHP_EOL; $return .= '})</pre>'; $return .= '<p>You can activate individual tabs in several ways:</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myTab a[href="#profile"]\').tab(\'show\'); // Select tab by name' . PHP_EOL; $return .= '$(\'#myTab a:first\').tab(\'show\'); // Select first tab' . PHP_EOL; $return .= '$(\'#myTab a:last\').tab(\'show\'); // Select last tab' . PHP_EOL; $return .= '$(\'#myTab li:eq(2) a\').tab(\'show\'); // Select third tab (0-indexed)' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Markup</h3>'; $return .= '<p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>'; $return .= 'data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> '; $return .= 'and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap tab styling.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-tabs">' . PHP_EOL; $return .= ' <li><a href="#home" data-toggle="tab">Home</a></li>' . PHP_EOL; $return .= ' <li><a href="#profile" data-toggle="tab">Profile</a></li>' . PHP_EOL; $return .= ' <li><a href="#messages" data-toggle="tab">Messages</a></li>' . PHP_EOL; $return .= ' <li><a href="#settings" data-toggle="tab">Settings</a></li>' . PHP_EOL; $return .= '</ul></pre>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().tab</h4>'; $return .= '<p>'; $return .= 'Activates a tab element and content container. Tab should have either a <code>data-target</code> or an '; $return .= '<code>href</code> targeting a container node in the DOM.'; $return .= '</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<ul class="nav nav-tabs" id="myTab">' . PHP_EOL; $return .= ' <li class="active"><a href="#home">Home</a></li>' . PHP_EOL; $return .= ' <li><a href="#profile">Profile</a></li>' . PHP_EOL; $return .= ' <li><a href="#messages">Messages</a></li>' . PHP_EOL; $return .= ' <li><a href="#settings">Settings</a></li>' . PHP_EOL; $return .= '</ul>' . PHP_EOL . PHP_EOL; $return .= '<div class="tab-content">' . PHP_EOL; $return .= ' <div class="tab-pane active" id="home">...</div>' . PHP_EOL; $return .= ' <div class="tab-pane" id="profile">...</div>' . PHP_EOL; $return .= ' <div class="tab-pane" id="messages">...</div>' . PHP_EOL; $return .= ' <div class="tab-pane" id="settings">...</div>' . PHP_EOL; $return .= '</div>' . PHP_EOL . PHP_EOL; $return .= '<script>' . PHP_EOL; $return .= ' $(function () {' . PHP_EOL; $return .= ' $(\'#myTab a:last\').tab(\'show\');' . PHP_EOL; $return .= ' })' . PHP_EOL; $return .= '</script>' . PHP_EOL; $return .= '</pre>'; $return .= '<h3>Events</h3>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>show</td>'; $return .= '<td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> '; $return .= 'and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) '; $return .= 'respectively.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>shown</td>'; $return .= '<td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>'; $return .= 'event.relatedTarget</code> to target the active tab and the previous active tab (if available) '; $return .= 'respectively.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'a[data-toggle="tab"]\').on(\'shown\', function (e) {' . PHP_EOL; $return .= ' e.target // activated tab' . PHP_EOL; $return .= ' e.relatedTarget // previous tab' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Tooltips'; $return .= '================================================== -->'; $return .= '<section id="tooltips">'; $return .= '<div class="page-header">'; $return .= '<h1>Tooltips <small>bootstrap-tooltip.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, '; $return .= 'which don\'t rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>'; $return .= '<p>For performance reasons, the tooltip and popover data-apis are opt in, meaning <strong>you must '; $return .= 'initialize them yourself</strong>.</p>'; $return .= '<p>Hover over the links below to see tooltips:</p>'; $return .= '<div class="bs-docs-example tooltip-demo">'; $return .= '<p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle='; $return .= '"tooltip" title="Default tooltip">you probably</a> haven\'t heard of them. Photo booth beard raw denim '; $return .= 'letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney\'s fixie sustainable quinoa '; $return .= '8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry '; $return .= 'richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel '; $return .= 'williamsburg marfa, four loko mcsweeney\'s cleanse vegan chambray. A really ironic artisan <a href="#" '; $return .= 'data-toggle="tooltip" title="A much longer tooltip belongs right here to demonstrate the max-width we apply.'; $return .= '">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The '; $return .= 'last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.'; $return .= '</p>'; $return .= '</div>'; $return .= '<h3>Four directions</h3>'; $return .= '<div class="bs-docs-example tooltip-demo">'; $return .= '<ul class="bs-docs-tooltip-examples">'; $return .= '<li><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>'; $return .= '<li><a href="#" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a>'; $return .= '</li>'; $return .= '<li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom'; $return .= '</a></li>'; $return .= '<li><a href="#" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<h3>Tooltips in input groups</h3>'; $return .= '<p>When using tooltips and popovers with the Bootstrap input groups, you\'ll have to set the <code>container'; $return .= '</code> (documented below) option to avoid unwanted side effects.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<p>Trigger the tooltip via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'#example\').tooltip(options)</pre>'; $return .= $this->options(); $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>placement</td>'; $return .= '<td>string | function</td>'; $return .= '<td>\'top\'</td>'; $return .= '<td>how to position the tooltip - top | bottom | left | right</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>selector</td>'; $return .= '<td>string</td>'; $return .= '<td>false</td>'; $return .= '<td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>title</td>'; $return .= '<td>string | function</td>'; $return .= '<td>\'\'</td>'; $return .= '<td>default title value if \'title\' tag isn\'t present</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>trigger</td>'; $return .= '<td>string</td>'; $return .= '<td>\'hover focus\'</td>'; $return .= '<td>how tooltip is triggered - click | hover | focus | manual. Note you case pass trigger mutliple, '; $return .= 'space seperated, trigger types.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>delay</td>'; $return .= '<td>number | object</td>'; $return .= '<td>0</td>'; $return .= '<td>'; $return .= '<p>delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>'; $return .= '<p>If a number is supplied, delay is applied to both hide/show</p>'; $return .= '<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>container</td>'; $return .= '<td>string | false</td>'; $return .= '<td>false</td>'; $return .= '<td>'; $return .= '<p>Appends the tooltip to a specific element <code>container: \'body\'</code></p>'; $return .= '</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= 'Options for individual tooltips can alternatively be specified through the use of data attributes.'; $return .= '</div>'; $return .= '<h3>Markup</h3>'; $return .= '<pre class="prettyprint linenums"><a href="#" data-toggle="tooltip" title="first tooltip">hover '; $return .= 'over me</a></pre>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().tooltip(options)</h4>'; $return .= '<p>Attaches a tooltip handler to an element collection.</p>'; $return .= '<h4>.tooltip(\'show\')</h4>'; $return .= '<p>Reveals an element\'s tooltip.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').tooltip(\'show\')</pre>'; $return .= '<h4>.tooltip(\'hide\')</h4>'; $return .= '<p>Hides an element\'s tooltip.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').tooltip(\'hide\')</pre>'; $return .= '<h4>.tooltip(\'toggle\')</h4>'; $return .= '<p>Toggles an element\'s tooltip.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').tooltip(\'toggle\')</pre>'; $return .= '<h4>.tooltip(\'destroy\')</h4>'; $return .= '<p>Hides and destroys an element\'s tooltip.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').tooltip(\'destroy\')</pre>'; $return .= '</section>'; $return .= '<!-- Popovers'; $return .= '================================================== -->'; $return .= '<section id="popovers">'; $return .= '<div class="page-header">'; $return .= '<h1>Popovers <small>bootstrap-popover.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Examples</h2>'; $return .= '<p>Add small overlays of content, like those on the iPad, to any element for housing secondary information. '; $return .= 'Hover over the button to trigger the popover. <strong>Requires <a href="#tooltips">Tooltip</a> to be '; $return .= 'included.</strong></p>'; $return .= '<h3>Static popover</h3>'; $return .= '<p>Four options are available: top, right, bottom, and left aligned.</p>'; $return .= '<div class="bs-docs-example bs-docs-example-popover">'; $return .= '<div class="popover top">'; $return .= '<div class="arrow"></div>'; $return .= '<h3 class="popover-title">Popover top</h3>'; $return .= '<div class="popover-content">'; $return .= '<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam '; $return .= 'venenatis vestibulum.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="popover right">'; $return .= '<div class="arrow"></div>'; $return .= '<h3 class="popover-title">Popover right</h3>'; $return .= '<div class="popover-content">'; $return .= '<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam '; $return .= 'venenatis vestibulum.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="popover bottom">'; $return .= '<div class="arrow"></div>'; $return .= '<h3 class="popover-title">Popover bottom</h3>'; $return .= '<div class="popover-content">'; $return .= '<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam '; $return .= 'venenatis vestibulum.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="popover left">'; $return .= '<div class="arrow"></div>'; $return .= '<h3 class="popover-title">Popover left</h3>'; $return .= '<div class="popover-content">'; $return .= '<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam '; $return .= 'venenatis vestibulum.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="clearfix"></div>'; $return .= '</div>'; $return .= '<p>No markup shown as popovers are generated from JavaScript and content within a <code>data</code> '; $return .= 'attribute.</p>'; $return .= '<h3>Live demo</h3>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<a href="#" class="btn btn-large btn-danger" data-toggle="popover" title="A Title" data-content="And '; $return .= 'here\'s some amazing content. It\'s very engaging. right?">Click to toggle popover</a>'; $return .= '</div>'; $return .= '<h4>Four directions</h4>'; $return .= '<div class="bs-docs-example tooltip-demo">'; $return .= '<ul class="bs-docs-tooltip-examples">'; $return .= '<li><a href="#" class="btn" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis '; $return .= 'lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>'; $return .= '<li><a href="#" class="btn" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis '; $return .= 'lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>'; $return .= '<li><a href="#" class="btn" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis '; $return .= 'lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>'; $return .= '<li><a href="#" class="btn" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis '; $return .= 'lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>'; $return .= '</ul>'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<p>Enable popovers via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'#example\').popover(options)</pre>'; $return .= $this->options(); $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>placement</td>'; $return .= '<td>string | function</td>'; $return .= '<td>\'right\'</td>'; $return .= '<td>how to position the popover - top | bottom | left | right</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>selector</td>'; $return .= '<td>string</td>'; $return .= '<td>false</td>'; $return .= '<td>if a selector is provided, tooltip objects will be delegated to the specified targets</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>trigger</td>'; $return .= '<td>string</td>'; $return .= '<td>\'click\'</td>'; $return .= '<td>how popover is triggered - click | hover | focus | manual</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>title</td>'; $return .= '<td>string | function</td>'; $return .= '<td>\'\'</td>'; $return .= '<td>default title value if \'title\' attribute isn\'t present</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>content</td>'; $return .= '<td>string | function</td>'; $return .= '<td>\'\'</td>'; $return .= '<td>default content value if \'data-content\' attribute isn\'t present</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>delay</td>'; $return .= '<td>number | object</td>'; $return .= '<td>0</td>'; $return .= '<td>'; $return .= '<p>delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>'; $return .= '<p>If a number is supplied, delay is applied to both hide/show</p>'; $return .= '<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>container</td>'; $return .= '<td>string | false</td>'; $return .= '<td>false</td>'; $return .= '<td>'; $return .= '<p>Appends the popover to a specific element <code>container: \'body\'</code></p>'; $return .= '</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= 'Options for individual popovers can alternatively be specified through the use of data attributes.'; $return .= '</div>'; $return .= '<h3>Markup</h3>'; $return .= '<p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use '; $return .= 'them just specify a selector option.</p>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().popover(options)</h4>'; $return .= '<p>Initializes popovers for an element collection.</p>'; $return .= '<h4>.popover(\'show\')</h4>'; $return .= '<p>Reveals an elements popover.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').popover(\'show\')</pre>'; $return .= '<h4>.popover(\'hide\')</h4>'; $return .= '<p>Hides an elements popover.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').popover(\'hide\')</pre>'; $return .= '<h4>.popover(\'toggle\')</h4>'; $return .= '<p>Toggles an elements popover.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').popover(\'toggle\')</pre>'; $return .= '<h4>.popover(\'destroy\')</h4>'; $return .= '<p>Hides and destroys an element\'s popover.</p>'; $return .= '<pre class="prettyprint linenums">$(\'#element\').popover(\'destroy\')</pre>'; $return .= '</section>'; $return .= '<!-- Alert'; $return .= '================================================== -->'; $return .= '<section id="alerts">'; $return .= '<div class="page-header">'; $return .= '<h1>Alert messages <small>bootstrap-alert.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example alerts</h2>'; $return .= '<p>Add dismiss functionality to all alert messages with this plugin.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert fade in">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="alert alert-block alert-error fade in">'; $return .= '<button type="button" class="close" data-dismiss="alert">×</button>'; $return .= '<h4 class="alert-heading">Oh snap! You got an error!</h4>'; $return .= '<p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat '; $return .= 'porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>'; $return .= '<p>'; $return .= '<a class="btn btn-danger" href="#">Take this action</a> <a class="btn" href="#">Or do this</a>'; $return .= '</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<p>Enable dismissal of an alert via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(".alert").alert()</pre>'; $return .= '<h3>Markup</h3>'; $return .= '<p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert '; $return .= 'close functionality.</p>'; $return .= '<pre class="prettyprint linenums"><a class="close" data-dismiss="alert" href="#">&times;'; $return .= '</a></pre>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().alert()</h4>'; $return .= '<p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure '; $return .= 'they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>'; $return .= '<h4>.alert(\'close\')</h4>'; $return .= '<p>Closes an alert.</p>'; $return .= '<pre class="prettyprint linenums">$(".alert").alert(\'close\')</pre>'; $return .= '<h3>Events</h3>'; $return .= '<p>Bootstrap\'s alert class exposes a few events for hooking into alert functionality.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>close</td>'; $return .= '<td>This event fires immediately when the <code>close</code> instance method is called.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>closed</td>'; $return .= '<td>This event is fired when the alert has been closed (will wait for css transitions to complete).</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#my-alert\').bind(\'closed\', function () {' . PHP_EOL; $return .= ' // do something…' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Buttons'; $return .= '================================================== -->'; $return .= '<section id="buttons">'; $return .= '<div class="page-header">'; $return .= '<h1>Buttons <small>bootstrap-button.js</small></h1>'; $return .= '</div>'; $return .= ''; $return .= '<h2>Example uses</h2>'; $return .= '<p>Do more with buttons. Control button states or create groups of buttons for more components like '; $return .= 'toolbars.</p>'; $return .= ''; $return .= '<h4>Stateful</h4>'; $return .= '<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<button type="button" id="fat-btn" data-loading-text="loading..." class="btn btn-primary">'; $return .= 'Loading state'; $return .= '</button>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" '; $return .= 'data-loading-text="Loading...">Loading state</button></pre>'; $return .= ''; $return .= '<h4>Single toggle</h4>'; $return .= '<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" '; $return .= 'data-toggle="button">Single Toggle</button></pre>'; $return .= ''; $return .= '<h4>Checkbox</h4>'; $return .= '<p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<div class="btn-group" data-toggle="buttons-checkbox">'; $return .= '<button type="button" class="btn btn-primary">Left</button>'; $return .= '<button type="button" class="btn btn-primary">Middle</button>'; $return .= '<button type="button" class="btn btn-primary">Right</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group" data-toggle="buttons-checkbox">' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Left</button>' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Middle</button>' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Right</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>Radio</h4>'; $return .= '<p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>'; $return .= '<div class="bs-docs-example" style="padding-bottom: 24px;">'; $return .= '<div class="btn-group" data-toggle="buttons-radio">'; $return .= '<button type="button" class="btn btn-primary">Left</button>'; $return .= '<button type="button" class="btn btn-primary">Middle</button>'; $return .= '<button type="button" class="btn btn-primary">Right</button>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="btn-group" data-toggle="buttons-radio">' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Left</button>' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Middle</button>' . PHP_EOL; $return .= ' <button type="button" class="btn btn-primary">Right</button>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<p>Enable buttons via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'.nav-tabs\').button()</pre>'; $return .= '<h3>Markup</h3>'; $return .= '<p>Data attributes are integral to the button plugin. Check out the example code below for the '; $return .= 'various markup types.</p>'; $return .= '<h3>Options</h3>'; $return .= '<p><em>None</em></p>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>$().button(\'toggle\')</h4>'; $return .= '<p>Toggles push state. Gives the button the appearance that it has been activated.</p>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= 'You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="btn" data-toggle="button" '; $return .= '>…</button></pre>'; $return .= '<h4>$().button(\'loading\')</h4>'; $return .= '<p>Sets button state to loading - disables button and swaps text to loading text. Loading text '; $return .= 'should be defined on the button element using the data attribute <code>data-loading-text</code>.'; $return .= '</p>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="btn" data-loading-text="loading stuff..." '; $return .= '>...</button></pre>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= '<a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists the disabled state across page loads'; $return .= '</a>. A workaround for this is to use <code>autocomplete="off"</code>.'; $return .= '</div>'; $return .= '<h4>$().button(\'reset\')</h4>'; $return .= '<p>Resets button state - swaps text to original text.</p>'; $return .= '<h4>$().button(string)</h4>'; $return .= '<p>Resets button state - swaps text to any data defined text state.</p>'; $return .= '<pre class="prettyprint linenums"><button type="button" class="btn" data-complete-text="finished!" '; $return .= '>...</button>'; $return .= '<script>' . PHP_EOL; $return .= ' $(\'.btn\').button(\'complete\')' . PHP_EOL; $return .= '</script>' . PHP_EOL; $return .= '</pre>'; $return .= '</section>'; $return .= '<!-- Collapse'; $return .= '================================================== -->'; $return .= '<section id="collapse">'; $return .= '<div class="page-header">'; $return .= '<h1>Collapse <small>bootstrap-collapse.js</small></h1>'; $return .= '</div>'; $return .= '<h3>About</h3>'; $return .= '<p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>'; $return .= '<p class="muted"><strong>*</strong> Requires the Transitions plugin to be included.</p>'; $return .= '<h2>Example accordion</h2>'; $return .= '<p>Using the collapse plugin, we built a simple accordion style widget:</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div class="accordion" id="accordion2">'; $return .= '<div class="accordion-group">'; $return .= '<div class="accordion-heading">'; $return .= '<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">'; $return .= 'Collapsible Group Item #1'; $return .= '</a>'; $return .= '</div>'; $return .= '<div id="collapseOne" class="accordion-body collapse in">'; $return .= '<div class="accordion-inner">'; $return .= 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon '; $return .= 'officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 '; $return .= 'wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. '; $return .= 'Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan '; $return .= 'excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt '; $return .= 'you probably haven\'t heard of them accusamus labore sustainable VHS.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="accordion-group">'; $return .= '<div class="accordion-heading">'; $return .= '<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">'; $return .= 'Collapsible Group Item #2'; $return .= '</a>'; $return .= '</div>'; $return .= '<div id="collapseTwo" class="accordion-body collapse">'; $return .= '<div class="accordion-inner">'; $return .= 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon '; $return .= 'officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 '; $return .= 'wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. '; $return .= 'Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan '; $return .= 'excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt '; $return .= 'you probably haven\'t heard of them accusamus labore sustainable VHS.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="accordion-group">'; $return .= '<div class="accordion-heading">'; $return .= '<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">'; $return .= 'Collapsible Group Item #3'; $return .= '</a>'; $return .= '</div>'; $return .= '<div id="collapseThree" class="accordion-body collapse">'; $return .= '<div class="accordion-inner">'; $return .= 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon '; $return .= 'officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 '; $return .= 'wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. '; $return .= 'Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan '; $return .= 'excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt '; $return .= 'you probably haven\'t heard of them accusamus labore sustainable VHS.'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div class="accordion" id="accordion2">' . PHP_EOL; $return .= ' <div class="accordion-group">' . PHP_EOL; $return .= ' <div class="accordion-heading">' . PHP_EOL; $return .= ' <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"'; $return .= '>' . PHP_EOL; $return .= ' Collapsible Group Item #1' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div id="collapseOne" class="accordion-body collapse in">' . PHP_EOL; $return .= ' <div class="accordion-inner">' . PHP_EOL; $return .= ' Anim pariatur cliche...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div class="accordion-group">' . PHP_EOL; $return .= ' <div class="accordion-heading">' . PHP_EOL; $return .= ' <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"'; $return .= '>' . PHP_EOL; $return .= ' Collapsible Group Item #2' . PHP_EOL; $return .= ' </a>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <div id="collapseTwo" class="accordion-body collapse">' . PHP_EOL; $return .= ' <div class="accordion-inner">' . PHP_EOL; $return .= ' Anim pariatur cliche...' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '...' . PHP_EOL; $return .= '</pre>'; $return .= '<p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and '; $return .= 'collapsing of another element.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">' . PHP_EOL; $return .= ' simple collapsible' . PHP_EOL; $return .= '</button>' . PHP_EOL . PHP_EOL; $return .= '<div id="demo" class="collapse in"> … </div>' . PHP_EOL; $return .= '</pre>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>Just add <code>data-toggle="collapse"</code> and a <code>data-target</code> to element to automatically '; $return .= 'assign control of a collapsible element. The <code>data-target</code> attribute accepts a css selector to '; $return .= 'apply the collapse to. Be sure to add the class <code>collapse</code> to the collapsible element. If '; $return .= 'you\'d like it to default open, add the additional class <code>in</code>.</p>'; $return .= '<p>To add accordion-like group management to a collapsible control, add the data attribute <code>'; $return .= 'data-parent="#selector"</code>. Refer to the demo to see this in action.</p>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Enable manually with:</p>'; $return .= '<pre class="prettyprint linenums">$(".collapse").collapse()</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option '; $return .= 'name to <code>data-</code>, as in <code>data-parent=""</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 50px;">type</th>'; $return .= '<th style="width: 50px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>parent</td>'; $return .= '<td>selector</td>'; $return .= '<td>false</td>'; $return .= '<td>If selector then all collapsible elements under the specified parent will be closed when this '; $return .= 'collapsible item is shown. (similar to traditional accordion behavior)</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>toggle</td>'; $return .= '<td>boolean</td>'; $return .= '<td>true</td>'; $return .= '<td>Toggles the collapsible element on invocation</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>.collapse(options)</h4>'; $return .= '<p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myCollapsible\').collapse({' . PHP_EOL; $return .= ' toggle: false' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.collapse(\'toggle\')</h4>'; $return .= '<p>Toggles a collapsible element to shown or hidden.</p>'; $return .= '<h4>.collapse(\'show\')</h4>'; $return .= '<p>Shows a collapsible element.</p>'; $return .= '<h4>.collapse(\'hide\')</h4>'; $return .= '<p>Hides a collapsible element.</p>'; $return .= '<h3>Events</h3>'; $return .= '<p>Bootstrap\'s collapse class exposes a few events for hooking into collapse functionality.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>show</td>'; $return .= '<td>This event fires immediately when the <code>show</code> instance method is called.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>shown</td>'; $return .= '<td>This event is fired when a collapse element has been made visible to the user (will wait for css '; $return .= 'transitions to complete).</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>hide</td>'; $return .= '<td>'; $return .= 'This event is fired immediately when the <code>hide</code> method has been called.'; $return .= '</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>hidden</td>'; $return .= '<td>This event is fired when a collapse element has been hidden from the user (will wait for css '; $return .= 'transitions to complete).</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'#myCollapsible\').on(\'hidden\', function () {' . PHP_EOL; $return .= ' // do something…' . PHP_EOL; $return .= '})</pre>'; $return .= '</section>'; $return .= '<!-- Carousel'; $return .= '================================================== -->'; $return .= '<section id="carousel">'; $return .= '<div class="page-header">'; $return .= '<h1>Carousel <small>bootstrap-carousel.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example carousel</h2>'; $return .= '<p>The slideshow below shows a generic plugin and component for cycling through elements like '; $return .= 'a carousel.</p>'; $return .= '<div class="bs-docs-example">'; $return .= '<div id="myCarousel" class="carousel slide">'; $return .= '<ol class="carousel-indicators">'; $return .= '<li data-target="#myCarousel" data-slide-to="0" class="active"></li>'; $return .= '<li data-target="#myCarousel" data-slide-to="1"></li>'; $return .= '<li data-target="#myCarousel" data-slide-to="2"></li>'; $return .= '</ol>'; $return .= '<div class="carousel-inner">'; $return .= '<div class="item active">'; $return .= '<img src="' . $OUTPUT->pix_url('screenshot', 'theme') . '" alt="">'; $return .= '<div class="carousel-caption">'; $return .= '<h4>First Thumbnail label</h4>'; $return .= '<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida '; $return .= 'at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="item">'; $return .= '<img src="' . $OUTPUT->pix_url('screenshot', 'theme') . '" alt="">'; $return .= '<div class="carousel-caption">'; $return .= '<h4>Second Thumbnail label</h4>'; $return .= '<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida '; $return .= 'at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '<div class="item">'; $return .= '<img src="' . $OUTPUT->pix_url('screenshot', 'theme') . '" alt="">'; $return .= '<div class="carousel-caption">'; $return .= '<h4>Third Thumbnail label</h4>'; $return .= '<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida '; $return .= 'at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>'; $return .= '</div>'; $return .= '</div>'; $return .= '</div>'; $left = true; if (right_to_left()) { $left = false; } $faleft = 'left'; $faright = 'right'; if (!$left) { $temp = $faleft; $faleft = $faright; $faright = $temp; } $return .= '<a class="left carousel-control" href="#myCarousel" data-slide="prev">'; $return .= '<i class="fa fa-chevron-circle-' . $faleft . '"></i></a>'; $return .= '<a class="right carousel-control" href="#myCarousel" data-slide="next">'; $return .= '<i class="fa fa-chevron-circle-' . $faright . '"></i></a>'; $return .= '</div>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums">'; $return .= '<div id="myCarousel" class="carousel slide">' . PHP_EOL; $return .= ' <ol class="carousel-indicators">' . PHP_EOL; $return .= ' <li data-target="#myCarousel" data-slide-to="0" class="active"></li>' . PHP_EOL; $return .= ' <li data-target="#myCarousel" data-slide-to="1"></li>' . PHP_EOL; $return .= ' <li data-target="#myCarousel" data-slide-to="2"></li>' . PHP_EOL; $return .= ' </ol>' . PHP_EOL; $return .= ' <!-- Carousel items -->' . PHP_EOL; $return .= ' <div class="carousel-inner">' . PHP_EOL; $return .= ' <div class="active item">…</div>' . PHP_EOL; $return .= ' <div class="item">…</div>' . PHP_EOL; $return .= ' <div class="item">…</div>' . PHP_EOL; $return .= ' </div>' . PHP_EOL; $return .= ' <!-- Carousel nav -->' . PHP_EOL; $return .= ' <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>' . PHP_EOL; $return .= ' <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>' . PHP_EOL; $return .= '</div>' . PHP_EOL; $return .= '</pre>'; $return .= '<div class="alert alert-warning">'; $return .= '<strong>Heads up!</strong>'; $return .= 'When implementing this carousel, remove the images we have provided and replace them with your own.'; $return .= '</div>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the '; $return .= 'keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to it\'s current '; $return .= 'position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>'; $return .= 'data-slide-to="2"</code>, which jump\'s the slide position to a particular index beginning with <code>0'; $return .= '</code>.</p>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call carousel manually with:</p>'; $return .= '<pre class="prettyprint linenums">$(\'.carousel\').carousel()</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to '; $return .= '<code>data-</code>, as in <code>data-interval=""</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 50px;">type</th>'; $return .= '<th style="width: 50px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>interval</td>'; $return .= '<td>number</td>'; $return .= '<td>5000</td>'; $return .= '<td>The amount of time to delay between automatically cycling an item. If false, carousel will not '; $return .= 'automatically cycle.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>pause</td>'; $return .= '<td>string</td>'; $return .= '<td>"hover"</td>'; $return .= '<td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel '; $return .= 'on mouseleave.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '<h3>Methods</h3>'; $return .= '<h4>.carousel(options)</h4>'; $return .= '<p>Initializes the carousel with an optional options <code>object</code> and starts cycling through '; $return .= 'items.</p>'; $return .= '<pre class="prettyprint linenums">'; $return .= '$(\'.carousel\').carousel({' . PHP_EOL; $return .= ' interval: 2000' . PHP_EOL; $return .= '})' . PHP_EOL; $return .= '</pre>'; $return .= '<h4>.carousel(\'cycle\')</h4>'; $return .= '<p>Cycles through the carousel items from left to right.</p>'; $return .= '<h4>.carousel(\'pause\')</h4>'; $return .= '<p>Stops the carousel from cycling through items.</p>'; $return .= '<h4>.carousel(number)</h4>'; $return .= '<p>Cycles the carousel to a particular frame (0 based, similar to an array).</p>'; $return .= '<h4>.carousel(\'prev\')</h4>'; $return .= '<p>Cycles to the previous item.</p>'; $return .= '<h4>.carousel(\'next\')</h4>'; $return .= '<p>Cycles to the next item.</p>'; $return .= '<h3>Events</h3>'; $return .= '<p>Bootstrap\'s carousel class exposes two events for hooking into carousel functionality.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 150px;">Event</th>'; $return .= '<th>Description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>slide</td>'; $return .= '<td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>slid</td>'; $return .= '<td>This event is fired when the carousel has completed its slide transition.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '</section>'; $return .= '<!-- Typeahead'; $return .= '================================================== -->'; $return .= '<section id="typeahead">'; $return .= '<div class="page-header">'; $return .= '<h1>Typeahead <small>bootstrap-typeahead.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example</h2>'; $return .= '<p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p>'; $return .= '<div class="bs-docs-example" style="background-color: #f5f5f5;">'; $return .= '<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" '; $return .= 'data-source=\'["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware",'; $return .= '"Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine",'; $return .= '"Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada",'; $return .= '"New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma",'; $return .= '"Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah",'; $return .= '"Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]\'>'; $return .= '</div>'; $return .= '<pre class="prettyprint linenums"><input type="text" data-provide="typeahead"></pre>'; $return .= '<p>You\'ll want to set <code>autocomplete="off"</code> to prevent default browser menus from appearing '; $return .= 'over the Bootstrap typeahead dropdown.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>Add data attributes to register an element with typeahead functionality as shown in the example above.</p>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call the typeahead manually with:</p>'; $return .= '<pre class="prettyprint linenums">$(\'.typeahead\').typeahead()</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to '; $return .= '<code>data-</code>, as in <code>data-source=""</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 50px;">type</th>'; $return .= '<th style="width: 100px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>source</td>'; $return .= '<td>array, function</td>'; $return .= '<td>[ ]</td>'; $return .= '<td>The data source to query against. May be an array of strings or a function. The function is passed two '; $return .= 'arguments, the <code>query</code> value in the input field and the <code>process</code> callback. The '; $return .= 'function may be used synchronously by returning the data source directly or asynchronously via the '; $return .= '<code>process</code> callback\'s single argument.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>items</td>'; $return .= '<td>number</td>'; $return .= '<td>8</td>'; $return .= '<td>The max number of items to display in the dropdown.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>minLength</td>'; $return .= '<td>number</td>'; $return .= '<td>1</td>'; $return .= '<td>The minimum character length needed before triggering autocomplete suggestions</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>matcher</td>'; $return .= '<td>function</td>'; $return .= '<td>case insensitive</td>'; $return .= '<td>The method used to determine if a query matches an item. Accepts a single argument, the <code>item'; $return .= '</code> against which to test the query. Access the current query with <code>this.query</code>. Return '; $return .= 'a boolean <code>true</code> if query is a match.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>sorter</td>'; $return .= '<td>function</td>'; $return .= '<td>exact match,<br> case sensitive,<br> case insensitive</td>'; $return .= '<td>Method used to sort autocomplete results. Accepts a single argument <code>items</code> and has the '; $return .= 'scope of the typeahead instance. Reference the current query with <code>this.query</code>.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>updater</td>'; $return .= '<td>function</td>'; $return .= '<td>returns selected item</td>'; $return .= '<td>The method used to return selected item. Accepts a single argument, the <code>item</code> and has '; $return .= 'the scope of the typeahead instance.</td>'; $return .= '</tr>'; $return .= '<tr>'; $return .= '<td>highlighter</td>'; $return .= '<td>function</td>'; $return .= '<td>highlights all default matches</td>'; $return .= '<td>Method used to highlight autocomplete results. Accepts a single argument <code>item</code> and has '; $return .= 'the scope of the typeahead instance. Should return html.</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= ''; $return .= '<h3>Methods</h3>'; $return .= '<h4>.typeahead(options)</h4>'; $return .= '<p>Initializes an input with a typeahead.</p>'; $return .= '</section>'; $return .= '<!-- Affix'; $return .= '================================================== -->'; $return .= '<section id="affix">'; $return .= '<div class="page-header">'; $return .= '<h1>Affix <small>bootstrap-affix.js</small></h1>'; $return .= '</div>'; $return .= '<h2>Example</h2>'; $return .= '<p>The subnavigation on the left is a live demo of the affix plugin.</p>'; $return .= '<hr class="bs-docs-separator">'; $return .= '<h2>Usage</h2>'; $return .= '<h3>Via data attributes</h3>'; $return .= '<p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element '; $return .= 'you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.</p>'; $return .= '<pre class="prettyprint linenums"><div data-spy="affix" data-offset-top="200">...</div></pre>'; $return .= '<div class="alert alert-info">'; $return .= '<strong>Heads up!</strong>'; $return .= 'You must manage the position of a pinned element and the behavior of its immediate parent. Position is '; $return .= 'controlled by <code>affix</code>, <code>affix-top</code>, and <code>affix-bottom</code>. Remember to check '; $return .= 'for a potentially collapsed parent when the affix kicks in as it\'s removing content from the normal flow '; $return .= 'of the page.'; $return .= '</div>'; $return .= '<h3>Via JavaScript</h3>'; $return .= '<p>Call the affix plugin via JavaScript:</p>'; $return .= '<pre class="prettyprint linenums">$(\'#navbar\').affix()</pre>'; $return .= '<h3>Options</h3>'; $return .= '<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to '; $return .= '<code>data-</code>, as in <code>data-offset-top="200"</code>.</p>'; $return .= '<table class="table table-bordered table-striped">'; $return .= '<thead>'; $return .= '<tr>'; $return .= '<th style="width: 100px;">Name</th>'; $return .= '<th style="width: 100px;">type</th>'; $return .= '<th style="width: 50px;">default</th>'; $return .= '<th>description</th>'; $return .= '</tr>'; $return .= '</thead>'; $return .= '<tbody>'; $return .= '<tr>'; $return .= '<td>offset</td>'; $return .= '<td>number | function | object</td>'; $return .= '<td>10</td>'; $return .= '<td>Pixels to offset from screen when calculating position of scroll. If a single number is provided, the '; $return .= 'offset will be applied in both top and left directions. To listen for a single direction, or multiple '; $return .= 'unique offsets, just provide an object <code>offset: { x: 10 }</code>. Use a function when you need to '; $return .= 'dynamically provide an offset (useful for some responsive designs).</td>'; $return .= '</tr>'; $return .= '</tbody>'; $return .= '</table>'; $return .= '</section>'; $return .= '</div>'; return $return; }
/** * Returns an HTML string * @return string Returns an HTML string */ public function output_html($data, $query = '') { global $OUTPUT; $return = ''; if ($this->visiblename != '') { $return .= $OUTPUT->heading($this->visiblename, 3, 'main'); } if ($this->description != '') { $return .= $OUTPUT->box(highlight($query, markdown_to_html($this->description)), 'generalbox formsettingheading'); } return $return; }
/** * Test get_messages. */ public function test_get_messages() { global $CFG; $this->resetAfterTest(true); $this->preventResetByRollback(); // This mark the messages as read!. $sink = $this->redirectMessages(); $user1 = self::getDataGenerator()->create_user(); $user2 = self::getDataGenerator()->create_user(); $user3 = self::getDataGenerator()->create_user(); $course = self::getDataGenerator()->create_course(); // Send a message from one user to another. message_post_message($user1, $user2, 'some random text 1', FORMAT_MOODLE); message_post_message($user1, $user3, 'some random text 2', FORMAT_MOODLE); message_post_message($user2, $user3, 'some random text 3', FORMAT_MOODLE); message_post_message($user3, $user2, 'some random text 4', FORMAT_MOODLE); message_post_message($user3, $user1, 'some random text 5', FORMAT_MOODLE); $this->setUser($user1); // Get read conversations from user1 to user2. $messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(1, $messages['messages']); // Get unread conversations from user1 to user2. $messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', false, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(0, $messages['messages']); // Get read messages send from user1. $messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(2, $messages['messages']); $this->setUser($user2); // Get read conversations from any user to user2. $messages = core_message_external::get_messages($user2->id, 0, 'conversations', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(2, $messages['messages']); $this->setUser($user3); // Get read notifications received by user3. $messages = core_message_external::get_messages($user3->id, 0, 'notifications', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(0, $messages['messages']); // Now, create some notifications... // We are creating fake notifications but based on real ones. // This one omits notification = 1. $eventdata = new stdClass(); $eventdata->modulename = 'moodle'; $eventdata->component = 'enrol_paypal'; $eventdata->name = 'paypal_enrolment'; $eventdata->userfrom = get_admin(); $eventdata->userto = $user1; $eventdata->subject = "Moodle: PayPal payment"; $eventdata->fullmessage = "Your PayPal payment is pending."; $eventdata->fullmessageformat = FORMAT_PLAIN; $eventdata->fullmessagehtml = ''; $eventdata->smallmessage = ''; message_send($eventdata); $message = new stdClass(); $message->notification = 1; $message->component = 'enrol_manual'; $message->name = 'expiry_notification'; $message->userfrom = $user2; $message->userto = $user1; $message->subject = 'Enrolment expired'; $message->fullmessage = 'Enrolment expired blah blah blah'; $message->fullmessageformat = FORMAT_MARKDOWN; $message->fullmessagehtml = markdown_to_html($message->fullmessage); $message->smallmessage = $message->subject; $message->contexturlname = $course->fullname; $message->contexturl = (string) new moodle_url('/course/view.php', array('id' => $course->id)); message_send($message); $userfrom = core_user::get_noreply_user(); $userfrom->maildisplay = true; $eventdata = new stdClass(); $eventdata->component = 'moodle'; $eventdata->name = 'badgecreatornotice'; $eventdata->userfrom = $userfrom; $eventdata->userto = $user1; $eventdata->notification = 1; $eventdata->subject = 'New badge'; $eventdata->fullmessage = format_text_email($eventdata->subject, FORMAT_HTML); $eventdata->fullmessageformat = FORMAT_PLAIN; $eventdata->fullmessagehtml = $eventdata->subject; $eventdata->smallmessage = $eventdata->subject; message_send($eventdata); $eventdata = new stdClass(); $eventdata->name = 'submission'; $eventdata->component = 'mod_feedback'; $eventdata->userfrom = $user1; $eventdata->userto = $user2; $eventdata->subject = 'Feedback submitted'; $eventdata->fullmessage = 'Feedback submitted from an user'; $eventdata->fullmessageformat = FORMAT_PLAIN; $eventdata->fullmessagehtml = '<strong>Feedback submitted</strong>'; $eventdata->smallmessage = ''; message_send($eventdata); $this->setUser($user1); // Get read notifications from any user to user1. $messages = core_message_external::get_messages($user1->id, 0, 'notifications', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(3, $messages['messages']); // Get one read notifications from any user to user1. $messages = core_message_external::get_messages($user1->id, 0, 'notifications', true, true, 0, 1); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(1, $messages['messages']); // Get unread notifications from any user to user1. $messages = core_message_external::get_messages($user1->id, 0, 'notifications', false, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(0, $messages['messages']); // Get read both type of messages from any user to user1. $messages = core_message_external::get_messages($user1->id, 0, 'both', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(4, $messages['messages']); // Get read notifications from no-reply-user to user1. $messages = core_message_external::get_messages($user1->id, $userfrom->id, 'notifications', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(1, $messages['messages']); // Get notifications send by user1 to any user. $messages = core_message_external::get_messages(0, $user1->id, 'notifications', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(1, $messages['messages']); // Test warnings. $CFG->messaging = 0; $messages = core_message_external::get_messages(0, $user1->id, 'both', true, true, 0, 0); $messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages); $this->assertCount(1, $messages['warnings']); // Test exceptions. // Messaging disabled. try { $messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0); $this->fail('Exception expected due messaging disabled.'); } catch (moodle_exception $e) { $this->assertEquals('disabled', $e->errorcode); } $CFG->messaging = 1; // Invalid users. try { $messages = core_message_external::get_messages(0, 0, 'conversations', true, true, 0, 0); $this->fail('Exception expected due invalid users.'); } catch (moodle_exception $e) { $this->assertEquals('accessdenied', $e->errorcode); } // Invalid user ids. try { $messages = core_message_external::get_messages(2500, 0, 'conversations', true, true, 0, 0); $this->fail('Exception expected due invalid users.'); } catch (moodle_exception $e) { $this->assertEquals('invaliduser', $e->errorcode); } // Invalid users (permissions). $this->setUser($user2); try { $messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0); $this->fail('Exception expected due invalid user.'); } catch (moodle_exception $e) { $this->assertEquals('accessdenied', $e->errorcode); } }
/** * Checks if user can self enrol. * * @param stdClass $instance enrolment instance * @param bool $checkuserenrolment if true will check if user enrolment is inactive. * used by navigation to improve performance. * @return bool|string true if successful, else error message or false. */ public function can_self_enrol(stdClass $instance, $checkuserenrolment = true) { global $CFG, $DB, $OUTPUT, $USER; if ($checkuserenrolment) { if (isguestuser()) { // Can not enrol guest. return get_string('noguestaccess', 'enrol') . $OUTPUT->continue_button(get_login_url()); } // Check if user is already enroled. if ($DB->get_record('user_enrolments', array('userid' => $USER->id, 'enrolid' => $instance->id))) { return get_string('canntenrol', 'enrol_self'); } } if ($instance->status != ENROL_INSTANCE_ENABLED) { return get_string('canntenrol', 'enrol_self'); } if ($instance->enrolstartdate != 0 and $instance->enrolstartdate > time()) { return get_string('canntenrolearly', 'enrol_self', userdate($instance->enrolstartdate)); } if ($instance->enrolenddate != 0 and $instance->enrolenddate < time()) { return get_string('canntenrollate', 'enrol_self', userdate($instance->enrolenddate)); } if (!$instance->customint6) { // New enrols not allowed. return get_string('canntenrol', 'enrol_self'); } if ($DB->record_exists('user_enrolments', array('userid' => $USER->id, 'enrolid' => $instance->id))) { return get_string('canntenrol', 'enrol_self'); } if ($instance->customint3 > 0) { // Max enrol limit specified. $count = $DB->count_records('user_enrolments', array('enrolid' => $instance->id)); if ($count >= $instance->customint3) { // Bad luck, no more self enrolments here. return get_string('maxenrolledreached', 'enrol_self'); } } if ($instance->customint5) { require_once "{$CFG->dirroot}/cohort/lib.php"; if (!cohort_is_member($instance->customint5, $USER->id)) { $cohort = $DB->get_record('cohort', array('id' => $instance->customint5)); if (!$cohort) { return null; } $a = format_string($cohort->name, true, array('context' => context::instance_by_id($cohort->contextid))); return markdown_to_html(get_string('cohortnonmemberinfo', 'enrol_self', $a)); } } return true; }
</div> RTAS--> <?php echo markdown_to_html($snippet->getContent(), $snippet); ?> <?php } ?> </div> <?php } else { ?> <div class="rt-snippet <?php echo $class; ?> "> <?php $options['query_string'] .= '&collection=' . $collection; ?> <!--RTAS <div class="rt-admin-tools"><?php echo link_to(__('Edit Snippet'), 'rtSnippetAdmin/new', $options); ?> </div> RTAS--> <?php echo isset($default) ? markdown_to_html($default) : ''; ?> </div> <?php }