Expose an asset router #13

Closed
cescoffier opened this Issue Nov 23, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@cescoffier
Member

cescoffier commented Nov 23, 2013

The router will ease the computation of "src" and "link" in templates

@cescoffier cescoffier added this to the 0.4.0 milestone Jun 23, 2014

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Jun 23, 2014

Member

This feature is already provided by the +routes+ object.

Member

cescoffier commented Jun 23, 2014

This feature is already provided by the +routes+ object.

@cescoffier cescoffier closed this Jun 23, 2014

@cescoffier cescoffier reopened this Jun 23, 2014

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Jun 23, 2014

Member

My fault, no it's not completely true.

Member

cescoffier commented Jun 23, 2014

My fault, no it's not completely true.

@cescoffier cescoffier modified the milestones: 0.7, 0.4.0, 0.6 Jun 23, 2014

@cescoffier cescoffier added the feature label Jun 23, 2014

@jenf11 jenf11 modified the milestones: 0.7, 0.6 Jun 27, 2014

cescoffier added a commit that referenced this issue Jul 1, 2014

Initial specification of the asset system (#13)
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

Add a way to compute asset's url from the "routes" thymeleaf object (#13
)

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

Use the new way to computes asset's url in the sample page (#13)
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

Update a test that does is invalid now (#13).
/assets/ return the asset list page.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

#13 - improve asset url computation
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

#13 - improve asset path computation
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

Add Javadoc (#13)
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 1, 2014

Use the new asset url computation mechanism (#13).
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Jul 2, 2014

Member

Fixed.

Two features were implemented:

  1. /assets provide a list of all available assets including the assets included in webjars.
  2. an asset method was added to the route object injected in thymeleaf template. So you can write:
<link th:href="${#routes.asset('css/bootstrap.min.css')}" rel="stylesheet"/>
<link th:href="${#routes.asset('css/bootstrap-theme.min.css')}" rel="stylesheet"/>
<script th:src="${#routes.asset('jquery.js')}"></script>
<script th:src="${#routes.asset('js/bootstrap.min.js')}"></script>

It computes the final URL.

Member

cescoffier commented Jul 2, 2014

Fixed.

Two features were implemented:

  1. /assets provide a list of all available assets including the assets included in webjars.
  2. an asset method was added to the route object injected in thymeleaf template. So you can write:
<link th:href="${#routes.asset('css/bootstrap.min.css')}" rel="stylesheet"/>
<link th:href="${#routes.asset('css/bootstrap-theme.min.css')}" rel="stylesheet"/>
<script th:src="${#routes.asset('jquery.js')}"></script>
<script th:src="${#routes.asset('js/bootstrap.min.js')}"></script>

It computes the final URL.

@cescoffier cescoffier closed this Jul 2, 2014

cescoffier added a commit that referenced this issue Jul 2, 2014

Check that the assets directory exists before retrieving its content (#…
…13)

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

cescoffier added a commit that referenced this issue Jul 2, 2014

Documentation related to #13
Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>

@cescoffier cescoffier modified the milestones: 0.6.1, 0.7 Jul 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment