Comments (21)
I think it's really a matter of personal taste and ERB seems like a great default since it's standard html.
from obtvse.
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.
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.
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.
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.
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.
HAML or SLIM get my vote.
from obtvse.
My vote is for ERB. As per Issue #38 it's super important to keep the simplicity, so why use anything else?
from obtvse.
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.
I feel there is value in keeping the Gemfile as short as possible. Let's stick to basic Rails.
from obtvse.
I'd suport a branch with Slim if someone took the initiative.
from obtvse.
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.
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.
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.
@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.
@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.
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.
@natew Alright. Sounds good to me.
from obtvse.
@Julian25 Check out refresh branch.
from obtvse.
Hey. I'll get to this ASAP. Just for clarification, we are going to convert things into Slim?
from obtvse.
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)
- which version could this application run in? HOT 3
- Tags attaching
- Link to blogs in Readme not working HOT 1
- Demo does not work anymore. HOT 3
- page rendering issues HOT 3
- Demo admin panel broken HOT 3
- Demo doesn't work HOT 1
- Problem with Gemfile? HOT 4
- eventmachine 0.12.10 causes build error HOT 1
- New Draft - Delete HOT 1
- Readme has incorrect clone path HOT 1
- Segmentation fault with rails 3.2.11 HOT 3
- [Refresh] 3 (possible) bugs HOT 3
- posts.rss broken HOT 1
- Setting Slug and Optional URL disabled in Master on Heroku
- Refresh branch. HOT 3
- Rails Server Failure: NoMethodError in Posts#index HOT 2
- Logout link for admins?
- Demo site currently does not work HOT 2
- this app thoroughly doesn't work? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obtvse.