stenvdb / craft-download-assets Goto Github PK
View Code? Open in Web Editor NEWAdds a download link next to assets
License: MIT License
Adds a download link next to assets
License: MIT License
I think you just need the mirror-image css in the assetbundle. You can switch the body class from ltr to rtl to check this out without having to switch the whole language.
body.ltr .element.linked .label {
padding-right: 20px;
}
body.ltr .element.removable.linked .label {
padding-right: 40px;
}
body.rtl .element.linked .label {
padding-left: 20px;
}
body.rtl .element.removable.linked .label {
padding-left: 40px;
}
body.ltr .element .download {
right: 22px;
}
body.rtl .element .download {
left: 22px;
}
.element .download {
position: absolute;
&::before {
content: '';
display: inline-block;
width: 19px;
height: 14px;
background-image: url('../img/inline-svg/download.svg');
background-size: 19px 14px;
line-height: 1;
vertical-align: middle;
}
&:hover::before {
background-image: url('../img/inline-svg/download-focus.svg');
}
}
When using this in conjunction with s3 asset volumes and the volume is set to non-public URLs, the value of the href tag is set to an empty string, so it just reloads the page. It should download the file the way https://bonadio-dev.eagledream-hosting.com/admin/assets does with file stream. This issue in the aws-s3 plugin may be related: craftcms/aws-s3#77
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.