hyunsupul / aesop-core

Open-sourced suite of components that empower interactive storytelling in WordPress.
http://aesopstoryengine.com
GNU General Public License v2.0
244 stars 56 forks source link

Handful of theme development questions #157

Closed 0aveRyan closed 10 years ago

0aveRyan commented 10 years ago

Hats off, really awesome composer you've written here! The UX in the Dashboard is great and the default output is better than that of most media companies. Kudos, you've clearly thought it out.

I have a few ideas I'm kicking around, and had two questions I hope you could answer.

  1. I'm struggling to remove default components. I've added new components, and modified default components via functions.php, but can't seem figure out the add_filter('aesop_avail_components') to modify the $shortcodes array.

Tried unsetting and splicing the array a number ways but kept breaking things. Suggestions?

It'd be awesome if there was an add_theme_support('aesop_components') to work with just like there is with Post Formats. Then by default make all components available, but watch for the function to turn off/on.

  1. Do you have documented which Bootstrap components you included (or better yet if you have a config.json laying around...)? I'm working with a pure css homepage grid and wanted to potentially bake a lighter, Bootstrap-free (or just even more reduced twbo) AESOP variant for story pages. I'll be happy to share anything I do, hoping to perhaps slim up that 75k style.css in the starter theme.
bearded-avenger commented 10 years ago

Thanks @dryanmedia ! Really appreciate the kind words. Check out this sample add-on here this should help ya out. https://github.com/AesopInteractive/sample-addon

That same filter you can use to remove attributes from components as well.

        add_filter('aesop_avail_components',    'remove_options');
    function remove_options( $shortcodes ) {

        // remove image width option for images
        unset($shortcodes['image']['atts']['imgwidth']);
        return $shortcodes;

    }

Regarding bootstrap, it doesnt' contain all of bootstrap. It's mostly just loading what it needs so you're probably better off actually loading bootstrap in a theme.

And that's a good idea about post formats

0aveRyan commented 10 years ago

That's awesome, appreciate it. Could swear I tried something like that, but it works.

I'm currently working on a theme, but might put out a Pure-based version of your starter. Upon inspection the twbo css you're using is about 57k in that starter and Pure has all the same elements and normalize.css for less than 5k. I'm a big twbo fan, but think this is a better use case for Pure.

Also writing a map component that takes different tile servers. That function'll help me add a toggle setting to disable the default component, gracias!

bearded-avenger commented 10 years ago

That would be awesome! Can't wait to see what you come up with there.

Yeah that starter theme is horribly out of date. You might find this one a bit more useful. https://github.com/AesopInteractive/aesop-story-theme

0aveRyan commented 10 years ago

Ah, that is helpful, thank you!

Yes, I'd love to put some Stamen, MapQuest and OSM tiles into that Map component. I'll send you links to any code I put up.