Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
javab_20230928
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
javab_20230928
Commits
5308c7ce
Commit
5308c7ce
authored
Oct 19, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spis treści i styl
parent
471b8b2e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
0 deletions
+99
-0
PierwszyKontroler.java
...ing/src/main/java/com/example/demo/PierwszyKontroler.java
+5
-0
styl.css
PC26-Spring/src/main/resources/static/styl.css
+54
-0
index.html
PC26-Spring/src/main/resources/templates/index.html
+40
-0
No files found.
PC26-Spring/src/main/java/com/example/demo/PierwszyKontroler.java
View file @
5308c7ce
...
@@ -9,6 +9,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -9,6 +9,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@Controller
public
class
PierwszyKontroler
{
public
class
PierwszyKontroler
{
@RequestMapping
(
"/"
)
public
String
index
()
{
return
"index.html"
;
}
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
@ResponseBody
@ResponseBody
public
String
sayHello
()
{
public
String
sayHello
()
{
...
...
PC26-Spring/src/main/resources/static/styl.css
0 → 100644
View file @
5308c7ce
body
{
background-color
:
#FFFFCC
;
font-family
:
'Arial'
,
sans-serif
;
}
h1
{
color
:
green
;
text-align
:
center
;
}
form
{
margin
:
30px
auto
;
padding
:
20px
;
width
:
800px
;
border
:
4px
solid
blue
;
background-color
:
#AAEEFF
;
}
.wynik
{
background-color
:
#FFFFFF
;
border
:
3px
solid
green
;
margin
:
20px
auto
;
width
:
800px
;
padding
:
10px
;
color
:
green
;
}
.error
{
background-color
:
#FFFFFF
;
border
:
6px
double
red
;
margin
:
20px
auto
;
padding
:
10px
;
width
:
800px
;
color
:
red
;
font-weight
:
bold
;
}
table
.tabela-walut
{
background-color
:
#FFFFFF
;
border-collapse
:
collapse
;
border
:
3px
solid
black
;
margin
:
0
auto
;
}
table
.tabela-walut
td
,
table
.tabela-walut
th
{
border
:
1px
solid
black
;
padding
:
2px
;
}
table
.tabela-walut
th
{
background-color
:
#FFCCDD
;
border-bottom
:
3px
double
black
;
}
PC26-Spring/src/main/resources/templates/index.html
0 → 100644
View file @
5308c7ce
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Spis treści
</title>
<link
rel=
"stylesheet"
type=
"text/css"
th:href=
"@{/styl.css}"
>
</head>
<body>
<h1>
Spis treści
</h1>
<h2>
Przykłady pisane bezpośrednio w Controllerze
</h2>
<ul>
<li><a
th:href=
"@{/hello}"
>
Hello
</a></li>
<li><a
th:href=
"@{/ping}"
>
Ping
</a></li>
<li><a
th:href=
"@{/time1}"
>
Czas obiektowo
</a>
(json)
</li>
<li><a
th:href=
"@{/time2}"
>
Czas tekstowo
</a></li>
<li><a
th:href=
"@{/time3}"
>
Czas tekstowo
</a>
(text/plain)
</li>
<li><a
th:href=
"@{/time4}"
>
Czas HTML w Javie
</a></li>
</ul>
<h2>
Przykłady z szablonami
</h2>
<ul>
<li><a
th:href=
"@{/time5}"
>
Czas szablon prosty
</a></li>
<li><a
th:href=
"@{/time6}"
>
Czas szablon rozbudowany
</a></li>
</ul>
<h2>
Przykład Parametry
</h2>
<ul>
<li><a
th:href=
"@{/parametry/witaj}"
>
witaj
</a></li>
<li><a
th:href=
"@{/parametry/witaj(imie='Ala')}"
>
witaj?imie=Ala
</a></li>
<li><a
th:href=
"@{/parametry/powtorz}"
>
powtorz
</a></li>
<li><a
th:href=
"@{/parametry/powtorz(tekst='Ola ma psa')}"
>
powtorz
</a>
n = 1
</li>
<li><a
th:href=
"@{/parametry/powtorz(tekst='Ala ma kota',n=10)}"
>
powtorz
</a>
n = 10
</li>
</ul>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment