Git Product home page Git Product logo

Comments (21)

alexcp avatar alexcp commented on August 19, 2024

I think it's really a matter of personal taste and ERB seems like a great default since it's standard html.

from obtvse.

krainboltgreene avatar krainboltgreene commented on August 19, 2024

True, ERB is HTML with embedded ruby code. However, it's all down to HTML in the end. The difference is cost of work, maintain-ability, and ease of learning. Slim provides some easy shortcuts with the smart sectioning that reduces maint. costs.

Either way, some client side generation would be good to have.

from obtvse.

cobyism avatar cobyism commented on August 19, 2024

I would love this to all be done in HAML, but I know not everyone would agree.

ERB is simple because everyone knows it and can re-write the views in their own template language if they have a strong preference, but it depends how 'opinionated' this blogging platform is going to be. FWIW I think being opinionated about a certain way of doing things is important, so if it were my call I'd switch to HAML as early as possible.

from obtvse.

krainboltgreene avatar krainboltgreene commented on August 19, 2024

I could do a PR to see how it'd look in each one. For the most part I can't imagine many people fuzzing with the views. Styles, yes, but views? Hmm. Maybe to add widgets and the like.

from obtvse.

natew avatar natew commented on August 19, 2024

My vote goes to ERB, only by a slight bit. Personally I'd be interested in Slim, but as we can see here already everyone has a different taste and ERB has the least learning curve for the most people.

from obtvse.

krainboltgreene avatar krainboltgreene commented on August 19, 2024

We could always have a slim branch. I'd be willing to maintain it.

Kurtis Rainbolt-Greene
The League Of Difference Engineers

On Tuesday, March 27, 2012 at 6:50 AM, nwienert wrote:

My vote goes to ERB, only by a slight bit. Personally I'd be interested in Slim, but as we can see here already everyone has a different taste and ERB has the least learning curve for the most people.


Reply to this email directly or view it on GitHub:
#19 (comment)

from obtvse.

jakeonrails avatar jakeonrails commented on August 19, 2024

HAML or SLIM get my vote.

from obtvse.

matthelm avatar matthelm commented on August 19, 2024

My vote is for ERB. As per Issue #38 it's super important to keep the simplicity, so why use anything else?

from obtvse.

krainboltgreene avatar krainboltgreene commented on August 19, 2024

I guess it depends on your definition of simplicity:

<section id="post-<%= post.id %>">
  <div class="post contain">
    <%- if post.external? -%>
      <h1 class="external">
        <% if @single_post %><%= link_to post.title, post.url %><% else %><%= link_to post.title, post.url %><% end %>
        <%= link_to '⚓', post.slug, :class => 'permalink' %>
      </h1>
    <%- else -%>
      <h1><% if @single_post %><%= post.title %><% else %><%= link_to post.title, post.slug %><% end %></h1>
    <%- end -%>

    <% if post.content %><%= markdown(post.content).to_html.html_safe %><% end %>

    <%- if is_admin? -%>
      <ul class="actions">
        <li><%= link_to 'Edit', '/edit/' + post.id.to_s unless @preview %></li>
      </ul>
    <%- end -%>
  </div>

  <% if @single_post %><a class="button space-top" href="<%= root_url %>">Back to Blog</a><% end %>
</section>
section id="post-#{post.id}"
  .post.contain
    - if post.external?
      h1.external
        - if @single_post
          = link_to post.title, post.url
        - else
          = link_to post.title, post.url
        = link_to '⚓', post.slug, class: 'permalink'
    - else
      h1
        - if @single_post
          = post.title
        - else
          = link_to post.title, post.slug
    = markdown(post.content).to_html.html_safe if post.content
    - if is_admin?
      ul.actions
        li = link_to 'Edit', '/edit/' + post.id.to_s unless @preview

  - if @single_post
    <a class="button space-top" href="<%= root_url %>">Back to Blog</a>

Of course it's a bit unfair, since writing in Slim helped me a few improvements:

section id="post-#{post.id}"
  .post.container
    - post_header = @single_post ? post.title : link_to(post.title, post.slug)
    - if post.external?
      h1.external = post_header + ' ' + link_to('⚓', post.slug, class: 'permalink')
    - else
      h1 = post_header
    = markdown(post.content).to_html.html_safe if post.content
    - if is_admin?
      ul.actions
        li = link_to 'Edit', '/edit/' + post.id.to_s unless @preview
  = link_to "Back to Blog", root_path, class: 'button space-top' if @single_post

from obtvse.

matthelm avatar matthelm commented on August 19, 2024

I feel there is value in keeping the Gemfile as short as possible. Let's stick to basic Rails.

from obtvse.

natew avatar natew commented on August 19, 2024

I'd suport a branch with Slim if someone took the initiative.

from obtvse.

krainboltgreene avatar krainboltgreene commented on August 19, 2024

I guess the question really is: Are we building a blog application or a clone of the svbtle platform?

If the former, then "keep the dependencies light" is a valid argument.

If the latter, then we should utilize as much power as we can.

On Mar 31, 2012, at 8:00 PM, Matt [email protected] wrote:

I feel there is value in keeping the Gemfile as short as possible. Let's stick to basic Rails.


Reply to this email directly or view it on GitHub:
#19 (comment)

from obtvse.

 avatar commented on August 19, 2024

I'd argue that most people using obtvse (and the 6 using svbtle) are familiar with ERB/Handlebars already and would be most comfortable with the master using ERB. Regardless, I don't mind experimenting so my vote goes towards Slim after seeing the above example. If obtvse is attempting to be a minimalistic blogging platform, Slim seems like a good fit.

from obtvse.

JulianGindi avatar JulianGindi commented on August 19, 2024

I completely understand the argument to stick with ERB but my vote would have to be for either HAML or Slim. True HTML is tedious to write and using an elegant templating language would allow for quicker coding. I also agree with the importance of the above question on whether this is meant to be a lightweight blogging engine or a copy of Svbtle. I can truly see this going either way...

from obtvse.

natew avatar natew commented on August 19, 2024

@krainboltgreene to answer your question we are building our own blog application, though I don't see how that argues against using a different template engine.

@bm1362 This is mostly my stance. I think if we do go with slim, it is actually simple enough and well documented, so it shouldn't be a burden.

If someone is willing to convert it do get in touch with me first, I have been rewriting much of obtvse over the last few weeks so it would be worthwhile to start with the new code.

from obtvse.

JulianGindi avatar JulianGindi commented on August 19, 2024

@natew Id be more than happy to get to work on converting the templates into Slim. It should not take to long. If anyone else wants to help that would make things go quicker obviously.

from obtvse.

natew avatar natew commented on August 19, 2024

Hmm... maybe I'll just push up this refresh branch soon then. Need to blow my passwords out of it again and restore the obtvse theme so may be tomorrow or so.

from obtvse.

JulianGindi avatar JulianGindi commented on August 19, 2024

@natew Alright. Sounds good to me.

from obtvse.

natew avatar natew commented on August 19, 2024

@Julian25 Check out refresh branch.

from obtvse.

JulianGindi avatar JulianGindi commented on August 19, 2024

Hey. I'll get to this ASAP. Just for clarification, we are going to convert things into Slim?

from obtvse.

natew avatar natew commented on August 19, 2024

Just want to update everyone since there are quite a few watching this thread, I've been working on a refresh branch that is pushed up here now. It's a rethinking of obtvse with a new look and lots of cool stuff going on.

Would love some help to get it finished, but on that note as well if you're looking to convert templates to Slim I think it would probably be best to just do the refresh branch templates as we will transition to that eventually.

from obtvse.

Related Issues (20)

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.