Giter VIP home page Giter VIP logo

bootstrapper's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrapper's Issues

Extra spaces in classes

Not sure if this is a problem or not, but I've noticed there are a lot of extra spaces added to class attributes here and there:

Two examples:

<button class=" btn-primary btn" type="submit">Save</button>

<div class="control-group ">

Why is this? And, could this cause any problems in certain circumstances?

tables helper seems to be broken

I can't figure out why but it appears that the tables helper is broken. I tried this code and it did not work:

$body = array(
    array(
        'id' => '1', 
        'fname' => 'Patrick', 
        'lname' => 'Talmadge'
    )
);



echo Table::open();

echo Table::headers('#', 'First Name', 'Last Name');
echo Table::body($body); 
echo Table::close();

Other things like creating buttons works fine. I'm doing this from within a view - not sure if that makes a difference. I'm not seeing any PHP errors getting thrown but the server just responds with an exception.

Also I believe on your examples page you have a echo Table::open(); at the bottom of the example code when it should be echo Table::close()

Remove 'icon-' prefix

To be able to use other prefixes (e.g. fa-icon) this needs to be removed / adaptable somehow. Right now its forcing icon- in front of the icon.

Navigation with custom icons css class

on navigation.php on line 202 i change this

$title = ' '.$title;

to this

$title = ' '.$title;

Now when i build i navigation bar a can use my icons css custom class's and steel use the bootstraps icons

Example
echo Navbar::create( __('admin::admin.administration'), '#',
array(
array(
'attributes' => array(),
'items' => array(
array('label'=>'Home', 'icon' => 'fam-home','url' => '#', 'active' => true),

and if a want to use bootstrap icons i do this

array('label'=>'Home', 'icon' => 'icon-home','url' => '#', 'active' => true),

Request for Snippets

It would be nice if someone would take the initiative to make sublime snippets for this useful bundle. I wish I could.

Asset Container set incorrectly in the Bundles start.php

Hi,

I've installed this via Artisan, put the code where it needs to be and published the assets - but when I looked at the generated CSS/JS references in the header, they didn't point to a bundle directory, just to directories like '/js', /css' even though a bundle directory named 'bootstrapper' had been generated properly.

Turns out that in the Bundles start.php, line 34 states:

Asset::container('bootstrapperbootstrapper')->bundle('bootstrapper');

Should be:

Asset::container('bootstrapper')->bundle('bootstrapper');

Making that change, it worked perfectly.

Thanks for the bundle - looks great!

Handle form validation

it would be nice if the Form could handle showing its own validation errors.
If there is an error, it should be able to set the error class + show the text. Right now its way to complicated to get that to work properly.

publish - copy all files

Hi,

//Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.7.2.js');
Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.7.2.min.js');

Shouldn't publish copy only 'min' files //not commented ?

Add icon support

<button type="submit" name="controls" value="prev" class="btn btn-large btn-inverse"><i class="icon-step-backward icon-white"></i></button>

Navigation::link helper

In a lot of Bootstrapper classes users are asked to format their links the following way :array('label' => 'link', 'url' => '#'). There is also an active key to manually specify active link but that's facultative since Bootstrapper automatically calculates the current link (I found a way to enhance that actually) and an attributes key for other cases.
Now for everyday life that's quite verbose and one of the reasons creating navigation elements is so code-heavy. So I suggest two helpers :

Navigation::link('label', '#')
// returns array('label', => 'label', 'url' => '#')

Navigation::links(array(
    'label'  => '#',
    'label2' => '#',
));
// returns an array of Navigation::link()-formatted links, ready to be fed into any function

This will helper making whatever the users input future-proof, if for any reason you one day want to change the key to use or whatever, and will help formatting the user's data faster for use with the classes and functions.
Others way to speed-up the transition – from whatever the user has to however you want the data to be formatted – should be thought about.

Table::full_row

I'd like to add an helper to the Tables class but I'm not sure about a thing or two : the helper would basically print out the following :

<tr>
  <td colspan="50">
    {content}
  </td>
</tr>

It's a pattern I use all the time to create a table row that spans the whole table but I'm unsure about if other people also do this or about maybe a better way to achieve that that just remained unknown to me all those years (or just maybe that doesn't fit into Bootstrapper's scope).
Unsure about a possible function name too. What do you think ?

Travis CI

I've almost finished writing the tests, now we need to hook up Bootstrapper to Travis. I already created the file, but to test it you need to go in your travis profile and turn on the bootstrapper repo – as collaborator I can't myself. :)

Class 'bootstrapper\Navigation' not found

in bundles/bootstrapper/tabbable.php on line 41

i tried to use the tabbed bar like in the example:

{{ Tabbable::tabs_left(
array(
array('label'=>'Section 1',
'active' => true,
'content' => "

I'm in Section 1.

"),
array('label'=>'Section 2',
'content' => "

Howdy, I'm in Section 2.

"),
array('label'=>'Section 3',
'content' => "

What up girl, this is Section 3.

"),
)
);}}

but it throws that exception

Inconsistent class naming

Why are some of the class names plural, while others are singular? In my opinion it's very confusing. I overcome it by changing the alias, but I think you should make a choice to go with one or the other. I prefer singular :)

Can't add 'value' attribute to input field

Form::control_group(
   Form::label('password', 'Password'),
   Form::large_password('password', array('value' => 'hi') )
);
<?php echo Form::control_group(
   Form::label('heh', 'heh'),
   Form::text('heh', '', array('value' => 'hi') )
);?>

Is value disallowed or something?

Error in cmd-line install

Hi! Thanks for great job, your bundle is excellent!

But today when I'am trying to install it with Artisan, I received an error:

PHP Warning: file_get_contents(http://nodeload.github.com/patricktalmadge/bootstrapper/zipball/master): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /www/mypj.dev/laravel/cli/tasks/bundle/providers/provider.php on line 69
Fetching [bootstrapper]...
Warning: file_get_contents(http://nodeload.github.com/patricktalmadge/bootstrapper/zipball/master): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /www/mypj.dev/laravel/cli/tasks/bundle/providers/provider.php on line 69
Error downloading the requested bundle.

What's happen?

Images Class

Images class for creating img-rounded, img-circle, and img-polariod images.

Coding standards

As you all know (or may know after I finish that sentence), Laravel 4 will unveil a lot of changes, not necessarily in the way you use it but behind the curtains. The biggest change is that every part of Laravel will be a separated Composer package, and as far as recent interviews of Taylor go, bundles should also be managed by Composer as PHP packages.
Now, although we're not talking near future here (the first alpha should come in the next months) that means bundles will at one point have to conform to PHP standarts in order to be accepted on Composer. That means following PSR and that means somewhat big coding style changes like switching from tabs to spaces indentation.

I didn't want to make those changes right now without Patrick's approval but in any case Boostrapper needs some cleanup standards-wise. So if that's ok I can work on it, if not that can be put off to the future. Your pick.
Note that there are some standard guidelines you can't enforce in Laravel 3, like if you want to use camelCase in unit testing (which is the standard) you won't completely be able to.

No version id

I think you should set a version id for this lovely bundle so we may know if there has been a new release soon we haven't checked. Ex: Bootstrapper V. 3.6.7.2

I am also having another issue with assets. When I publish assets, js, img and css folders are created under bundle's folder and not published to the real assets folder. It publishes to the right assets folder when I make a fresh laravel install.

Thanks.

Error On Lang After Update

After i updated with artisan my application does this.

Unhandled Exception
Message:

Cannot use object of type Laravel\Lang as array

Location:

... \bundles\bootstrapper\src\Bootstrapper\Helpers.php on line 32

It driving me nots

Problem in start.php

I pushed a pull request today and it's just when I looked at the script that I saw a typo that was there before but got past me :

start.php:32

<?php
    'BootstrapperBootstrapper\\Badges'  => __DIR__.'/badges.php',

I'm not at work so I can't make a pull request but I though you should know :)

Asset::container loads bootstrap styles in incorrect order

at the top of my template I used:

echo Asset::container('bootstrapper')->styles();

this output the following lines:

<link href="http://localhost/bundles/bootstrapper/css/bootstrap.min.css" media="all" type="text/css" rel="stylesheet">
<link href="http://localhost/bundles/bootstrapper/css/bootstrap-responsive.min.css" media="all" type="text/css" rel="stylesheet">
<link href="http://localhost/bundles/bootstrapper/css/nav-fix.css" media="all" type="text/css" rel="stylesheet">

This is incorrect, because nav-fix.css should come after bootstrap and before the responsive css, as noted here.

An example of the issue it causes is here:

Picture 1.png

(there is whitespace above the nav bar)

This is fixed if the nav-fix.css is loaded second and not third.

MediaObject class

I'm kind of busy at work these days so I don't have much time to work on Bootstrapper, all the more considering I now have two other bundles to work on.
I still found time to create a quick class to implement the new media object in Bootstrap 2.1.2 :

// Simple media object
MediaObject::create('content', 'path/to/image', array(attributes))

// Add a more detailed image
MediaObject::create('content')
  ->with_image('path/to/image', 'alt text', array(attributes))

// Add a title to the media object
MediaObject::create('content')
  ->with_title('<h5 class="media-heading">My custom title</h5>')

// Automatic titles wrapping
MediaObject::create('content')
  ->with_h2('My title', array(attributes))

// Pull the image to any side
MediaObject::create('content', 'path/to/image')
  ->pull([left/right])
  ->pull_left()
  ->pull_right()

// Nest a media object inside a media object
MediaObject::create('content', 'path/to/image')
  ->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))

// You can nest as many objects as you want
MediaObject::create('content', 'path/to/image')
  ->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
  ->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
  ->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))

// Display the media objects as a media list
MediaObject::open_list(array(attributes))
  MediaObject::create('content', 'path/to/image')
  MediaObject::create('content', 'path/to/image')
MediaObject::close_list()

And there you go. This thread is for comments/additions/fixes you deem relevant.
Tests are added and everything is a-ok. Go crazy kids !

folders

Hi,

I keep my assets in assets folder in main folder.

{{ Asset::container('bootstrapper')->styles(); }}
{{ Asset::container('bootstrapper')->scripts(); }}

creates:

link href="assets/bundles/bootstrapper/css/bootstrap.min.css" media="all" type="text/css" rel="stylesheet"
link href="assets/bundles/bootstrapper/css/nav-fix.css" media="all" type="text/css" rel="stylesheet"
link href="assets/bundles/bootstrapper/css/bootstrap-responsive.min.css" media="all" type="text/css" rel="stylesheet"
script src="assets/bundles/bootstrapper/js/jquery-1.7.2.min.js" /script
script src="assets/bundles/bootstrapper/js/bootstrap.min.js" /script

( I have removed < > chars from the code above to seem right)

so I copied you css, img and js folders into the assets/bundles/bootstrapper

This doesn't seem to be a clever way. What do I mistaken?

Thanks.

Editing a core file?

In your installation instructions, you say to change the class which laravel\database\query.php uses for pagination. Couldn't you come up with a different way to make sure that your class is used? Editing a core Laravel file seems like a very bad idea.

Unit Tests

Does anyone see any value in creating unit tests for Bootstrapper?

Laravel can't find class after upgrade to bootstrapper v4.

Weird, Laravel can't find class after upgrade to bootstrapper v4.

=== Here comes the error messages ===

Unhandled Exception
Message:

Class 'Bootstrapper\Buttons' not found

Location:

/home/www/sites/myproject/laravel/autoloader.php on line 55

Stack Trace:

0 /home/www/sites/myproject/laravel/laravel.php(40): Laravel\Error::native(2, 'Class 'Bootstra...', '/home/www/sites...', 55)
1 [internal function]: Laravel{closure}(2, 'Class 'Bootstra...', '/home/www/sites...', 55, Array)
2 /home/www/sites/myproject/laravel/autoloader.php(55): class_alias('Bootstrapper\Bu...', 'Buttons')
3 [internal function]: Laravel\Autoloader::load('Buttons')
4 /home/www/sites/myproject/laravel/view.php(366) : eval()'d code(11): spl_autoload_call('Buttons')
5 /home/www/sites/myproject/laravel/view.php(366): eval()
6 /home/www/sites/myproject/laravel/blade.php(71): Laravel\View->get()
7 [internal function]: Laravel{closure}(Object(Laravel\View))
8 /home/www/sites/myproject/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
9 /home/www/sites/myproject/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
10 /home/www/sites/myproject/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
11 /home/www/sites/myproject/laravel/view.php(570): Laravel\View->render()
12 /home/www/sites/myproject/laravel/response.php(246): Laravel\View->__toString()
13 /home/www/sites/myproject/laravel/laravel.php(178): Laravel\Response->render()
14 /home/www/sites/myproject/public/index.php(34): require('/home/www/sites...')
15 {main}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.