Skip to content

Commit

Permalink
Refactored /app/x
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkBrines committed Nov 27, 2024
1 parent 99eced9 commit 9b6f003
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 16 deletions.
48 changes: 48 additions & 0 deletions public/img/logo_store.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions resources/scss/layout/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.header {
padding: 50px 7%;
margin-bottom: 60px;
display: flex;
justify-content: space-between;
align-items: center;
Expand Down Expand Up @@ -45,6 +46,10 @@
transform: translate(0);
}
*/

>img {
height: 100%;
}
}

>.nav {
Expand Down
27 changes: 23 additions & 4 deletions resources/scss/module/apps.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.flex-spacer {
display: flex;
flex-direction: row;
justify-content: space-between;
min-width: 100%;
}

div#app-head {
display: flex;
gap: 20px;
Expand Down Expand Up @@ -43,10 +50,6 @@ table#app-details-table {
padding-right: 35px;
border: 8px transparent solid;
}

>thead {
font-weight: normal;
}
}

h1.app-prop-title {
Expand All @@ -55,4 +58,20 @@ h1.app-prop-title {

margin-top: 20px;
margin-bottom: 10px;
}

table#app-release-table {
background-color: #eee;
min-width: 100%;

th,
td {
padding: 10px;
border: 1px solid #ccc;
}

tr:nth-child(even) {
background-color: #ddd;
}

}
4 changes: 2 additions & 2 deletions resources/views/base/header.edge
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="header top">
<header class="header">
<a href="/" class="logo">
<img src="/img/logo.png" alt="Paxo" style="height: 100%">
<img src="/img/logo_store.svg" alt="Paxo store logo">
</a>

<nav class="nav">
Expand Down
32 changes: 23 additions & 9 deletions resources/views/store/app.edge
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
@component('store/store_container')
<div id="app-head">
<img src="{{ app.image ?? '/img/logo.png'}}">
<div id="app-details">
<h1>{{app.name}}</h1>
<h2>{{author.username}}</h2>
<div class="flex-spacer">
<div id="app-head">
<img src="{{ app.image ?? '/img/logo.png'}}">
<div id="app-details">
<h1>{{app.name}}</h1>
<h2>{{author.username}}</h2>
</div>
</div>

<div id="app-head-actions">
<a href="/app/{{app.id}}/download" class="btn btn-submit">
Télécharger
</a>
</div>
</div>


<table id="app-details-table">
<thead>
<tr>
Expand All @@ -21,7 +30,7 @@
<td>{{app.downloads}}</td>
<!-- <td>Non implémenté</td> -->
<td>Francais</td>
<td><a href="{{app.ext_url}}">{{ (new URL(app.ext_url)).hostname }}</a></td>
<td><a href="{{app.ext_url}}" target="_blank">{{ (new URL(app.ext_url)).hostname }}</a></td>
</tr>
</tbody>
</table>
Expand All @@ -34,7 +43,7 @@

<h1 class="app-prop-title">Versions</h1>

<table style="border: 1px solid gray;">
<table id="app-release-table">
<thead>
<th>Version</th>
<th>Actions</th>
Expand All @@ -53,12 +62,17 @@
@end
</table>

<div class="flex justify-center">
@if(user && user.id == author.id)

<h1 class="app-prop-title">Administration de l'app</h1>
<div style="display: flex; gap: 15px;">
<a href="/app/{{app.id}}/manage" class="btn btn-submit">
Modifier
</a>
<a href="/app/{{app.id}}/releases/manage" class="btn btn-submit" style="margin-left: 10px;">
<a href="/app/{{app.id}}/releases/manage" class="btn btn-submit">
Gérer les versions
</a>
</div>

@endif
@end
2 changes: 1 addition & 1 deletion resources/views/store/store_container.edge
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Store
</div>
</div>

<div style="float:left; width: calc(100% - 300px); text-align:left;">
<div style="float:left; width: calc(100% - 300px); text-align:left; margin-bottom: 100px;">
{{{ await $slots.main() }}}
</div>
</div>
Expand Down

0 comments on commit 9b6f003

Please sign in to comment.