Skip to content

Commit

Permalink
vite implementation b00tc4mp#167
Browse files Browse the repository at this point in the history
  • Loading branch information
annagonzalez9 committed Oct 21, 2024
1 parent 8ada7a6 commit e12a4e5
Show file tree
Hide file tree
Showing 82 changed files with 5,112 additions and 411 deletions.
Binary file added staff/anna-gonzalez/.DS_Store
Binary file not shown.
33 changes: 0 additions & 33 deletions staff/anna-gonzalez/React.aitana/index.html

This file was deleted.

57 changes: 0 additions & 57 deletions staff/anna-gonzalez/React.aitana/main.js

This file was deleted.

67 changes: 0 additions & 67 deletions staff/anna-gonzalez/React.aitana/style.css

This file was deleted.

37 changes: 0 additions & 37 deletions staff/anna-gonzalez/React.firstAttempt/index.html

This file was deleted.

88 changes: 0 additions & 88 deletions staff/anna-gonzalez/React.firstAttempt/main.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions staff/anna-gonzalez/unsocial.8/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unsocial</title>
<link rel="shortcut icon" href="https://static-00.iconduck.com/assets.00/blank-yellow-icon-2048x2048-lzfypkl4.png"
type="image/x-icon"> <!--ICON OF THE PAGE-->
<link rel="stylesheet" href="style.css">
</head>

<body>
<script src="data/users.js"></script>
<script src="data/posts.js"></script>

<script src="logic/createPost.js"></script>
<script src="logic/getPosts.js"></script>
<script src="logic/loginUser.js"></script>
<script src="logic/registerUser.js"></script>

<script src="proto-chain/index.js"></script>

<script src="compo/Compo.js"></script>
<script src="compo/Code.js"></script>
<script src="compo/Button.js"></script>
<script src="compo/Form.js"></script>
<script src="compo/Heading.js"></script>
<script src="compo/Image.js"></script>
<script src="compo/Input.js"></script>
<script src="compo/Label.js"></script>
<script src="compo/Link.js"></script>
<script src="compo/ListItem.js"></script>
<script src="compo/Paragraph.js"></script>
<script src="compo/PasswordInput.js"></script>
<script src="compo/Preformatted.js"></script>
<script src="compo/Snippet.js"></script>
<script src="compo/Span.js"></script>
<script src="compo/Time.js"></script>
<script src="compo/UnorderedList.js"></script>

<script src="view/CreatePost.js"></script>
<script src="view/Home.js"></script>
<script src="view/Login.js"></script>
<script src="view/PostItem.js"></script>
<script src="view/PostList.js"></script>
<script src="view/Register.js"></script>

<script src="main.js"></script>
</body>

</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
</head>

<body>
<div id="root"></div>
<div id="root"></div> <!--where react renders the app, like a big container-->
<!--es un "lienzo" donde react dibuja toda la app, manipulando el DOM dinámicamente-->

<script src="data/uuid.js"></script>
<script src="data/uuid.js"></script> <!--code pieces-->

<script src="logic/authenticateUser.js"></script>
<script src="logic/createPost.js"></script>
Expand All @@ -23,11 +24,12 @@
<script src="logic/getUserName.js"></script>
<script src="logic/getUserUsername.js"></script>

<!--react libraries-->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>

<!--babel used to write JSX directly on the browser-->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<script src="main.jsx" type="text/babel"></script>
</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { Component } = React
class PasswordInput extends Component { //-----------PasswordInput class-----------
constructor(props) {
super(props)

//state used to control the type of password and the icon showd when click
this.state = { type: 'password', status: '🔐' }
}

Expand All @@ -24,6 +24,7 @@ class PasswordInput extends Component { //-----------PasswordInput class--------
}
}

//props example: onLoggedIn & onRegisterClick (they're functions executed when login or register)
function Login(props) { //-----------Login-----------
return <section>
<h2>Login</h2>
Expand Down Expand Up @@ -211,7 +212,7 @@ function CreatePost(props) {
class App extends Component { //-----------App general Compo-----------
constructor(props) {
super(props)

//initial state:
this.state = { view: typeof sessionStorage.loggedInUserId === 'undefined' ? 'login' : 'home' }
}

Expand Down
Loading

0 comments on commit e12a4e5

Please sign in to comment.