account.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $(function(){
  2. $.getJSON("../../assets/js/landingpage_photos.json", function (data) {
  3. const tmphtml=template("favorite-photos",{photos:data});
  4. $("#project-photo-row").append(tmphtml);
  5. });
  6. var obj={
  7. Project_name:'Title for the project',
  8. date:"2021.08.11 17:23",
  9. read:true,
  10. txt:"Contrary to popular belief,Lorem Ipsum is not simply random text.It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.Richard McClintock,a Latin professor at Hampden-Sydney College in Virginia,looked up one of the more obscure Latin words,consectetur,from a Lorem lpsum passage,and going through the cites of the word in classical literature,discovered the undoubtable source.",
  11. list:[
  12. "../../assets/img/landingpage/SketchPng89e9554a3265a9c1f8d56f3f7dd92e7e0af6a15c8c7b8aa9fddfe992757c51a0.png",
  13. "../../assets/img/landingpage/SketchPng4f81a60c9fe9d2ae25bb83fb0252c7bdab23768bbc807bbae7f9e5b04b694bd8.png",
  14. "../../assets/img/landingpage/SketchPng7d6f19699512d467d9c2c6735798214c0ad484446e64adfb3f1215fb3d1cf5bb.png",
  15. "../../assets/img/landingpage/SketchPng3622edd1182388117b81d016412b296bafd4b2e05706408fc9de0dd39c2c52a6.png",
  16. "../../assets/img/landingpage/SketchPngcb1de6df3ae05d75f886fa3734104662e588761124ed01a2a70098de8319fd64.png",
  17. "../../assets/img/landingpage/SketchPngdeef997ff688c81e59cf6e882f2970cdc203ead50855f1db4e719e5ed73958b7.png",
  18. "../../assets/img/landingpage/SketchPngaca45c5ff6a2d365055c1489e841ff3a83787adf7a31d5a5ee88dcc478e79835.png",
  19. "../../assets/img/landingpage/SketchPngb0ddea94e6fe18953526d1a639df71ca6ec7cddd5b5299c13b4e1a273fad4ef1.png",
  20. "../../assets/img/landingpage/SketchPngb61811580d481d4def6488e495e5e7ce94fb3a74b302b0d46c348b834d261380.png",
  21. ]
  22. }
  23. var list=[
  24. obj,
  25. obj,
  26. obj,
  27. obj,
  28. ]
  29. var postproject=window.localStorage.getItem("postproject")
  30. if(postproject){
  31. postproject=JSON.parse(postproject)
  32. list=[
  33. postproject,
  34. ...list
  35. ]
  36. }
  37. $(".follow-box").append(template("follow-photos",{list:list}));
  38. $('.sort-box').on('click','.sort-tab',function(){
  39. let $this=$(this),showbox=$(this).data('show');
  40. if($this.hasClass('sort-tab-active')){
  41. return;
  42. }
  43. $('.sort-box .sort-tab-active').removeClass('sort-tab-active');
  44. $this.addClass('sort-tab-active');
  45. $(".project-box,.follow-box").hide();
  46. $("."+showbox).show();
  47. });
  48. $(".follow-btn2").on('click',function(){
  49. window.location.href="../company/postproject.html?1=1"
  50. });
  51. $(".filter-menu").on('click','li',function(){
  52. // zeroModal.alert({
  53. // content:$(this).text()
  54. // });
  55. });
  56. });