Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_weekendowa_20221008
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
java_weekendowa_20221008
Commits
73403791
Commit
73403791
authored
Nov 27, 2022
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Przykładowy styl dla tabeli z danymi klienta.
parent
95056d93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
12 deletions
+38
-12
customer.jsp
...klepSpring/src/main/webapp/WEB-INF/templates/customer.jsp
+8
-7
customers.jsp
...lepSpring/src/main/webapp/WEB-INF/templates/customers.jsp
+11
-5
styl.css
PC30-SklepSpring/src/main/webapp/styl.css
+19
-0
No files found.
PC30-SklepSpring/src/main/webapp/WEB-INF/templates/customer.jsp
View file @
73403791
...
...
@@ -6,17 +6,18 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
Klient ${customer.name}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/styl.css"
/>
<c:url
var=
"style_url"
value=
"/styl.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${style_url}"
/>
</head>
<body>
<h1>
Klient ${customer.name}
</h1>
<table>
<tr><t
d>
Email:
</td
><td>
${customer.customerEmail}
</td></tr>
<tr><t
d>
Nazwa:
</td
><td>
${customer.name}
</td></tr>
<tr><t
d>
Numer tel:
</td
><td>
${customer.phoneNumber}
</td></tr>
<tr><t
d>
Adres:
</td
><td>
${customer.address}
</td></tr>
<tr><t
d>
Miasto:
</td
><td>
${customer.postalCode} ${customer.city}
</td></tr>
<table
class=
"data-table"
>
<tr><t
h>
Email:
</th
><td>
${customer.customerEmail}
</td></tr>
<tr><t
h>
Nazwa:
</th
><td>
${customer.name}
</td></tr>
<tr><t
h>
Numer tel:
</th
><td>
${customer.phoneNumber}
</td></tr>
<tr><t
h>
Adres:
</th
><td>
${customer.address}
</td></tr>
<tr><t
h>
Miasto:
</th
><td>
${customer.postalCode} ${customer.city}
</td></tr>
</table>
</body>
...
...
PC30-SklepSpring/src/main/webapp/WEB-INF/templates/customers.jsp
View file @
73403791
...
...
@@ -2,20 +2,27 @@
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"s"
uri=
"http://www.springframework.org/tags"
%
>
<!DOCTYPE html>
<
%
--
W
tym
pliku
u
ż
ywam
tag
ó
w
c:url
do
generowania
adres
ó
w
,
kt
ó
re
s
ą
poprawne
niezale
ż
nie
od
miejsca
zdeployowania
aplikacji
.
Oboj
ę
tnie
,
czy
aplikacja
dzia
ł
abezpo
ś
rednio
pod
adresem
localhost:8080
/
,
czy
w
jakim
ś
podkatalogu
(
ma
niepusty
"
context-path
"),
-
adresy
s
ą
odpowiednio
poprawiane
.
Jest
to
jednak
nieco
pracoch
ł
onne
w
zapisie
,
dlatego
jest
to
tylko
w
tym
jednym
pliku
.
--
%
>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Lista klientów
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/styl.css"
/>
<c:url
var=
"style_url"
value=
"/styl.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${style_url}"
/>
</head>
<body>
<h1>
Lista klientów
</h1>
<table>
<tr><t
d>
Email:
</td><td>
Nazwa:
</td><td>
Numer tel:
</td><td>
Adres:
</td><td>
Miasto:
</td
></tr>
<table
class=
"data-table"
>
<tr><t
h>
Email
</th><th>
Nazwa
</th><th>
Telefon
</th><th>
Adres
</th><th>
Miasto
</th
></tr>
<c:forEach
var=
"customer"
items=
"${customers}"
>
<c:url
var=
"adr"
value=
"/customers/${customer.customerEmail}"
/>
<tr>
<td>
${customer.customerEmail}
</td>
<td>
<a
href=
"${adr}"
>
${customer.customerEmail}
</a>
</td>
<td>
${customer.name}
</td>
<td>
${customer.phoneNumber}
</td>
<td>
${customer.address}
</td>
...
...
@@ -23,6 +30,5 @@
</tr>
</c:forEach>
</table>
</body>
</html>
PC30-SklepSpring/src/main/webapp/styl.css
View file @
73403791
...
...
@@ -128,3 +128,22 @@ div.action {
max-height
:
200px
;
margin
:
5px
;
}
.data-table
{
border-collapse
:
collapse
;
border
:
2px
solid
black
;
background-color
:
#AAFFEE
;
margin
:
1em
100px
;
}
.data-table
th
,
.data-table
td
{
font-size
:
0.95em
;
padding
:
2px
4px
;
text-align
:
center
;
border
:
1px
solid
black
;
}
.data-table
th
{
font-weight
:
bold
;
background-color
:
#EE88DD
;
}
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