Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Development_of_Web_Applications
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Silas Meister
Development_of_Web_Applications
Commits
c482e7b0
Commit
c482e7b0
authored
1 year ago
by
Silas Meister
Browse files
Options
Downloads
Patches
Plain Diff
Show article on separate page
parent
8e902533
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
php/Index.php
+1
-1
1 addition, 1 deletion
php/Index.php
php/NewsArticle.html
+26
-0
26 additions, 0 deletions
php/NewsArticle.html
php/NewsArticle.php
+24
-2
24 additions, 2 deletions
php/NewsArticle.php
styles.css
+37
-2
37 additions, 2 deletions
styles.css
with
88 additions
and
5 deletions
php/Index.php
+
1
−
1
View file @
c482e7b0
...
@@ -40,7 +40,7 @@ class Index extends Page {
...
@@ -40,7 +40,7 @@ class Index extends Page {
$news
[]
=
new
News
(
$title
,
$imgurl
,
$content
);
$news
[]
=
new
News
(
$title
,
$imgurl
,
$content
);
}
}
$resultSet
->
clos
e
();
$resultSet
->
fre
e
();
return
$news
;
return
$news
;
}
}
...
...
This diff is collapsed.
Click to expand it.
php/NewsArticle.html
0 → 100644
+
26
−
0
View file @
c482e7b0
<!DOCTYPE html>
<html
lang=
"de"
>
<head>
<title>
News Article
</title>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
style=
"text/css"
href=
"../styles.css"
/>
</head>
<body>
<header
class=
"news-article-header"
>
<h1>
Europe Wants Ideas for Cave-Spelumking Moon Robots
</h1>
</header>
<main
class=
"news-article-main"
>
<div
class=
"news-article-image-container"
>
<img
src=
"../img/astronaut.jpg"
/>
</div>
<p
class=
"news-article-content"
>
dfg sfgggggggfsdfsdfsdfsdfsdfth.
</p>
</main>
<footer
class=
"news-article-footer"
>
<h4><a
href=
"Index.php"
>
Back to NASA page
</a></h4>
</footer>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
php/NewsArticle.php
+
24
−
2
View file @
c482e7b0
...
@@ -56,11 +56,33 @@ class NewsArticle extends Page
...
@@ -56,11 +56,33 @@ class NewsArticle extends Page
$data
=
$this
->
getViewData
();
$data
=
$this
->
getViewData
();
$this
->
generatePageHeader
(
'News Article'
);
$this
->
generatePageHeader
(
'News Article'
);
var_dump
(
$data
);
$title
=
""
;
$imgurl
=
""
;
$content
=
""
;
if
(
count
(
$data
)
!==
0
)
{
$title
=
$data
[
self
::
TITLE
];
$imgurl
=
$data
[
self
::
IMGURL
];
$content
=
$data
[
self
::
CONTENT
];
}
echo
<<<EOT
echo
<<<EOT
<body>
<body>
<header></header>
<header class="news-article-header">
<h1>$title</h1>
</header>
<main class="news-article-main">
<div class="news-article-image-container">
<img src="$imgurl" />
</div>
<p class="news-article-content">$content</p>
</main>
<footer class="news-article-footer">
<h4><a href="Index.php">Back to NASA page</a></h4>
</footer>
</body>
</body>
EOT;
EOT;
...
...
This diff is collapsed.
Click to expand it.
styles.css
+
37
−
2
View file @
c482e7b0
...
@@ -140,7 +140,6 @@ a {
...
@@ -140,7 +140,6 @@ a {
display
:
block
;
display
:
block
;
word-wrap
:
break-word
;
word-wrap
:
break-word
;
white-space
:
pre-wrap
;
white-space
:
pre-wrap
;
background-color
:
blue
;
}
}
.admin-button
a
{
.admin-button
a
{
...
@@ -451,7 +450,7 @@ main {
...
@@ -451,7 +450,7 @@ main {
height
:
100%
;
height
:
100%
;
}
}
/*
a
dmin.
html Page
*/
/*
A
dmin.
php
*/
.admin-header
,
.login-header
{
.admin-header
,
.login-header
{
text-align
:
center
;
text-align
:
center
;
...
@@ -529,6 +528,42 @@ main {
...
@@ -529,6 +528,42 @@ main {
border-radius
:
0.1rem
;
border-radius
:
0.1rem
;
}
}
/* NewsArticle.php */
.news-article-header
{
font-size
:
1rem
;
text-align
:
center
;
}
.news-article-main
{
margin
:
0
;
padding
:
0
;
width
:
100%
;
}
.news-article-main
>
.news-article-image-container
{
display
:
block
;
width
:
100%
;
margin
:
0
auto
;
text-align
:
center
;
}
.news-article-image-container
>
img
{
width
:
20rem
;
}
.news-article-main
>
.news-article-content
{
display
:
block
;
font-size
:
1.1rem
;
padding
:
0.5rem
;
margin
:
0
;
}
.news-article-footer
{
font-size
:
0.9rem
;
text-align
:
center
;
width
:
100%
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment