Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Kaa Framework
Demo Application
Forum
Commits
2e11c91e
Commit
2e11c91e
authored
1 year ago
by
Ilya Petrovanov
Browse files
Options
Download
Patches
Plain Diff
feat: Добавил поддержку различной статики
parent
0498fed9
main
1 merge request
!3
KTemplate Bundle
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
config/ktemplate.yaml
+1
-1
config/ktemplate.yaml
docker-compose.yaml
+3
-3
docker-compose.yaml
public/static/css/style.css
+0
-0
public/static/css/style.css
public/static/js/script.js
+4
-0
public/static/js/script.js
public/static/pepe.png
+0
-0
public/static/pepe.png
templates/greeting
+6
-1
templates/greeting
with
14 additions
and
5 deletions
+14
-5
config/ktemplate.yaml
+
1
−
1
View file @
2e11c91e
ktemplate
:
path
:
/app/public/
css
path
:
/app/public/
static
url
:
"
http://localhost:8800"
template_path
:
/app/templates
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yaml
+
3
−
3
View file @
2e11c91e
...
...
@@ -8,7 +8,7 @@ services:
-
.:/app
ports
:
-
"
880
0
:8800"
-
"
880
1
:8800"
working_dir
:
/app/public
entrypoint
:
php -S 0.0.0.0:8800
...
...
@@ -21,10 +21,10 @@ services:
-
.:/app
ports
:
-
"
880
1
:880
1
"
-
"
880
0
:880
0
"
working_dir
:
/app
entrypoint
:
kphp_out/server -H 880
1
-f 1 --user root
command
:
kphp_out/server -H 880
0
-f 1
0
--user root
database
:
...
...
This diff is collapsed.
Click to expand it.
public/css/style.css
→
public/
static/
css/style.css
+
0
−
0
View file @
2e11c91e
File moved
This diff is collapsed.
Click to expand it.
public/static/js/script.js
0 → 100644
+
4
−
0
View file @
2e11c91e
let
num1
=
5
;
let
num2
=
10
;
let
sum
=
num1
+
num2
;
document
.
getElementById
(
"
consoleOutput
"
).
innerHTML
+=
"
Sum
"
+
num1
+
"
and
"
+
num2
+
"
equals
"
+
sum
+
"
<br>
"
;
This diff is collapsed.
Click to expand it.
public/static/pepe.png
0 → 100644
+
0
−
0
View file @
2e11c91e
37.5 KB
This diff is collapsed.
Click to expand it.
templates/greeting
+
6
−
1
View file @
2e11c91e
...
...
@@ -9,10 +9,15 @@
Test
</header>
<body>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ asset("
style.css
")
}}"
/
>
<
img
src=
"{{ asset("
pepe.png
",
"
png
")
}}"
>
<p
id=
"consoleOutput"
></p>
<script
src=
"{{ asset("
js
/
script.js
",
"
js
")
}}"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ asset("
css
/
style.css
",
"
css
")
}}"
/>
<p>
This text will be red as defined in the external stylesheet.
</p>
<p>
Hello, {{ name }}
</p>
<img
src=
"{{ asset("
pepe.png
",
"
png
")
}}"
>
<p
style=
"color: blue"
>
The
<code>
style
</code>
attribute can override it, though.
</p>
</body>
<footer>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets