Giter Site home page Giter Site logo

travelogue's Introduction

Travelogue

Travelogue is community user driven blog website used to share tips, experience, and stories about their favorite locations around the world!

Sprints

Sprint 1: Create a website with basic user sign up capabilities.

  1. Navigate to "/" and see a basic splash page with:
  • The name of the website.
  • Links to "Log In" and "Sign Up".
  1. Sign up for an account.
  2. Log in to their account if they already have one.
  3. Be redirected to their public profile page after logging in.
  4. On their public profile page, see their name, the current city they have set in their profile, and their join date.
  5. See the site-wide header on every page with:
  • A link to "Log Out" if they're logged in.
  • Links to "Log In" and "Sign Up" if they're logged out.
  1. Update their profile by making changes to their name and/or current city.
  2. See the titles of all the posts they've contributed (start with pre-seeded data).
  3. Click on the title of one of their posts and be redirected to a "show" page for that post.
  4. View post "show" pages with title, author, and content.

Sprint 2: Functionality with Cities and Posts

  1. View the "San Francisco" page (at "/cities/1") including:
  • The site-wide header.
  • The name of the city.
  • An iconic photo of the city.
  1. View a list of posts on the San Francisco page:
  • Sorted by newest first.
  • With the post titles linked to the individual post "show" pages.
  1. Use an "Add New Post" button on the San Francisco city page to pull up the new post form.
  2. Create a new post for San Francisco (Hint: nested resources).
  3. Click "Edit" on ANY individual post, and be redirected to the edit form.
  4. Click "delete" on ANY individual post, then:
  • See a pop-up that says: "Are you sure you want to delete #{title}?"
  • If the user confirms, delete the post.

Sprint 3: Validations & Authorization

  1. View city pages for "London" and "Gibraltar".
  2. Verify that a new post they create is successfully published on the correct city page.

A user is authorized to perform certain actions on the site, according to the following rules:

  1. A user MUST be logged in to create/update/destroy resources.
  2. A user may only edit their own profile and edit/delete their own posts.

Code Snippets

Alex

City Show Page

     <% if current_user == article.user %>
      <div class = "button">
        <%= link_to "edit", edit_article_path(article.id), class: 'btn btn-light' %>
      </div>
      <div class = "button">
        <%= button_to "remove", article_path(article)  %>
      </div></br>
      <% end %>

Colbert

City Show Page

 <%= button_to "remove", article_path(article), { method: :delete, data: {confirm: "Are you sure you want to delete '#{article.title}'?"}, class: 'btn btn-light'} %>

IS

Article Controller

def create
    # @article = current_user.articles.new(article_params) 
    @article = Article.new(article_params)
    current_user.articles << @article
    # current_city.articles << @article
    if @article.save
      flash[:notice] = "Successfully created article."
      redirect_to article_path(@article)
    else
      flash[:error] = @article.errors.full_messages.join(", ")
      redirect_to new_article_path
    end
  end

Routes

get "/users/:last_name/articles/:id", to: "articles#show", as: "user_article"
get "/cities/:name/articles/:id", to: "articles#show", as: "city_article"

To Be Figured Out

get "/users/:last_name, to: "users#show", as: "user_name"
get "/users/:name, to: "cities#show", as: "city_name"

Doug

Git and Github Experience

On local master branch, DO NOT DO THIS

git pull origin feature_branch

Be Alert in Resolving Merge Conflicts

<<<<<<<<HEAD
========
.city_show_title:hover {
  opacity: .99;
  text-decoration: none;
>>>>>>>>>>
a:-webkit-any-link {
  text-decoration: none;
}

#notice {
  margin: 50px;
}

When merging multiple feature branches, merge each feature branch into the master individually.

Technology Used

  • Ruby On Rails
  • bcrypt
  • ffaker
  • Heroku
  • Git + Github
  • RESTful Routes
  • HTML5
  • CSS

Installation

  1. Fork and Clone Repo
bundle install
rake db:create
rake db:migrate
rake db:seed
rails s
  1. Go to localhost:3000 in Browser

Link to Heroku

This application is deployed on heroku here.

Features to Implement

  1. Add More Cities
  2. Add Geotags
  3. Cannot sign up with an existing email address
  4. Post Title must be within 200 Characters

Contributers

Is Angieri

Colbert Tse

Alex Rao

Doug Tsui

travelogue's People

Contributors

bachtsui avatar trebloc avatar alexpsu avatar

Watchers

 avatar  avatar  avatar

Forkers

trebloc

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.