Changeset 6941fac


Ignore:
Timestamp:
02/16/23 15:28:28 (21 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
7e3f2f7
Parents:
9ee306b
Message:

link to home and added headers

Location:
Prototype Application/Paw5/src/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java

    r9ee306b r6941fac  
    2828    }
    2929
    30     @GetMapping("create-post")
     30    @GetMapping("/create-post")
    3131    public String get(Model model) {
    3232        //TODO: vakvo ama za lista so pets
     
    3636    }
    3737
    38     @PostMapping("submit-post")
     38    @PostMapping("/submit-post")
    3939    public String savePost(@RequestParam(required = false) String name,
    4040                           @RequestParam String gender,
  • Prototype Application/Paw5/src/main/resources/templates/create-post.html

    r9ee306b r6941fac  
    77    <meta charset="UTF-8">
    88    <title>Create a post</title>
     9    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
     10    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
     11    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
     12    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
    913</head>
    1014<body>
     15<header>
     16    <nav class="navbar navbar-expand-md navbar-dark bg-dark">
     17        <div class="container">
     18            <a class="navbar-brand" href="/home">Paw 5</a>
     19            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
     20                    aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
     21                <span class="navbar-toggler-icon"></span>
     22            </button>
     23
     24            <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
     25                <ul class="navbar-nav m-auto">
     26                    <li class="nav-item m-auto">
     27                        <a class="nav-link active" href="/home/aboutUs">About us</a>
     28                    </li>
     29                    <li class="nav-item m-auto">
     30                        <a class="nav-link active" href="/login">Login</a>
     31                    </li>
     32                    <li class="nav-item m-auto">
     33                        <a class="nav-link active" href="/register">Register</a>
     34                    </li>
     35                </ul>
     36            </div>
     37        </div>
     38    </nav>
     39</header>
    1140    <h1>Create post</h1>
    1241<form th:action="@{/submit-post}" method="post">
  • Prototype Application/Paw5/src/main/resources/templates/home.html

    r9ee306b r6941fac  
    3535  </nav>
    3636</header>
    37 
     37<div>
     38  <form method="get" th:action="@{'/create-post'}">
     39    <button id="submit" type="submit">Create an Adoption Post</button>
     40  </form>
     41</div>
    3842<div>
    3943  <h1>Welcome to Paw 5</h1>
Note: See TracChangeset for help on using the changeset viewer.