- Use the React Toolbox Card component for each post.
- Use the "Dame click" button to show/hide the comments component and rename with an appropiate name.
- Implement flexbox (pure CSS) for input styling (1 row, 2 columns)
- Define the data structure for a Post.
Basic knowledge
- Create a comment component with
name
,email
,country
,age
props and integrate it to Post component - Create a list of comments by post and show it in each post.
- Add a button to show/hide the comments component.
- If there's not comments in a post, show the message "This post has not comments".
- Create a component with a form with 4 input fields:
name
,email
,country
,age
(validate input types). - Render the comments form (the component created in the step 5) below the comments component in each Post.
- Use an stylesheet and apply the styles that you consider for each component.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bVXkiypFhqQ84sC9gTdrEj16TyQqK39XPG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x4331bBE946B10428e7a2d57838443a527e2f6f55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This needs tidied up before production TODO | |
var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas" | |
,"Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands" | |
,"Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica" | |
,"Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea" | |
,"Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana" | |
,"Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSV.open("file.csv", "wb") do |csv| | |
csv << ["Name", "Phone"] | |
people = Person.by_role("assistant").by_gender("f").by_days("vs") | |
people.each do |p| | |
p.phone[5..9] = "xxxxx" | |
csv << [p.name, p.phone] | |
end | |
people = Person.by_role("assistant").by_gender("f").by_days("s") | |
people.each do |p| | |
csv << [p.name, p.phone] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.col-0, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
flex: 0 0 auto; | |
padding: 0 1% 0 1%; | |
} | |
.container { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
CSV.foreach('app/services/rg_list.csv', headers: true) do |row| | |
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase, gender: row['Gender'].to_s.downcase | |
end | |
CSV.foreach('app/services/rg17_register_full.csv', headers: true) do |row| | |
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase.strip, gender: row['Gender'].to_s.downcase, register_date: row['register_date'].to_s.downcase, birth_date: row['birth_date'].to_s, phone: row['phone'].to_s.downcase.strip, level: row['level'].to_s.downcase, motivation: row['motivation'].to_s.downcase, heard_ror: row['heard_ror'].to_s.downcase, laptop: row['laptop'].to_s.downcase, so: row['so'].to_s.downcase, expectation: row['expectation'].to_s.downcase, how_did_you_find_it: row['how_did_you_find_it'].to_s.downcase | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:5.6-apache | |
RUN apt-get update && apt-get install -y \ | |
libmcrypt-dev \ | |
libxml2-dev \ | |
libpng12-dev \ | |
libjpeg-dev | |
RUN docker-php-ext-install mysqli | |
RUN docker-php-ext-install mcrypt | |
RUN docker-php-ext-install soap |