Skip to content

Commit

Permalink
Merge pull request #11 from Astylodon/responsive
Browse files Browse the repository at this point in the history
Responsive improvements
  • Loading branch information
TheIndra55 authored May 30, 2024
2 parents 17e3556 + 481cde0 commit be0553b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
12 changes: 10 additions & 2 deletions assets/css/_login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
height: 90vh;
}

.login .form-group {
width: 25vh;
@media (min-width: 540px) {
.login .form-group {
width: 250px;
}
}

@media (max-width: 540px) {
.login .form-group {
width: 100%;
}
}

.login input[type=submit] {
Expand Down
1 change: 1 addition & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "bootstrap/dist/js/bootstrap.bundle"
2 changes: 2 additions & 0 deletions views/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
<body>
{% block body %}{% endblock %}
{% block script %}{% endblock %}

<script src="{{ "js/main.js" | vite }}"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/dashboard/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>

<div class="row mt-2">
<div class="col-6">
<div class="col-lg-6 mb-2">
<div class="card">
<div class="card-body">
<h5 class="card-title">Pages</h5>
Expand All @@ -35,7 +35,7 @@
</div>
</div>

<div class="col-6">
<div class="col-lg-6 mb-2">
<div class="card">
<div class="card-body">
<h5 class="card-title">Referrers</h5>
Expand Down
2 changes: 1 addition & 1 deletion views/login/login.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="top-alert">{{ error }}</div>
{% endif %}

<form action="" method="post" class="d-flex justify-content-center align-items-center flex-column login">
<form action="" method="post" class="d-flex justify-content-center align-items-center flex-column login m-2">
<div class="mb-2 form-group">
<label for="usernameInput" class="form-label">Username</label>
<input type="text" id="usernameInput" name="username" class="form-control" required autofocus value="{{ username|default }}" placeholder="Enter a username">
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
rollupOptions: {
input: {
css: "assets/css/app.scss",
main: "assets/js/main.js",
graphs: "assets/js/graphs.js"
}
}
Expand Down

0 comments on commit be0553b

Please sign in to comment.